chef

package
v0.0.0-...-4cd85cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package chef provides resources for configuring a chef client.rb file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConfig

func BuildConfig(settings Settings) (string, error)

BuildConfig takes settings and returns a client.rb

func CheckChefInstall

func CheckChefInstall(clientPath string) bool

CheckChefInstall will return true/false if chef is installed

func GetConfig

func GetConfig() (string, error)

GetConfig returns a formated client.rb for the current node

func InstallChef

func InstallChef() (bool, error)

InstallChef will check to see if chef needs to be installed and if so install using the appropriate options per platform

func RunChef

func RunChef() (status bool, err error)

RunChef will call chef-client in a loop to setup a node

func WriteFiles

func WriteFiles(clientConfig string) error

WriteFiles writes required config files to disk

Types

type Settings

type Settings struct {
	LogLevel             string
	LogLocation          string
	ValidationClientName string
	ValidationKey        string
	ChefServerURL        string
	JSONAttribs          string
	SSLVerifyMode        string
	LocalKeyGeneration   bool
	RestTimeout          int
	HTTPRetryCount       int
	NoLazyLoad           bool
	OhaiDirectory        string
	OhaiDisabledPlugins  []string
	NodeName             string
}

Settings contains the client.rb settings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL