chefsolo

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Overview

This package implements a provisioner for Packer that uses Chef to provision the remote machine, specifically with chef-solo (that is, without a Chef server).

Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfigTemplate = `` /* 412-byte string literal not displayed */

Functions

This section is empty.

Types

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`

	ChefEnvironment            string   `mapstructure:"chef_environment"`
	ChefLicense                string   `mapstructure:"chef_license"`
	ConfigTemplate             string   `mapstructure:"config_template"`
	CookbookPaths              []string `mapstructure:"cookbook_paths"`
	RolesPath                  string   `mapstructure:"roles_path"`
	DataBagsPath               string   `mapstructure:"data_bags_path"`
	EncryptedDataBagSecretPath string   `mapstructure:"encrypted_data_bag_secret_path"`
	EnvironmentsPath           string   `mapstructure:"environments_path"`
	ExecuteCommand             string   `mapstructure:"execute_command"`
	InstallCommand             string   `mapstructure:"install_command"`
	RemoteCookbookPaths        []string `mapstructure:"remote_cookbook_paths"`
	Json                       map[string]interface{}
	PreventSudo                bool     `mapstructure:"prevent_sudo"`
	RunList                    []string `mapstructure:"run_list"`
	SkipInstall                bool     `mapstructure:"skip_install"`
	StagingDir                 string   `mapstructure:"staging_directory"`
	GuestOSType                string   `mapstructure:"guest_os_type"`
	Version                    string   `mapstructure:"version"`
	// contains filtered or unexported fields
}

func (*Config) FlatMapstructure added in v1.4.5

func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type ConfigTemplate

type ConfigTemplate struct {
	CookbookPaths              string
	DataBagsPath               string
	EncryptedDataBagSecretPath string
	RolesPath                  string
	EnvironmentsPath           string
	ChefEnvironment            string
	ChefLicense                string

	// Templates don't support boolean statements until Go 1.2. In the
	// mean time, we do this.
	// TODO(mitchellh): Remove when Go 1.2 is released
	HasDataBagsPath               bool
	HasEncryptedDataBagSecretPath bool
	HasRolesPath                  bool
	HasEnvironmentsPath           bool
}

type ExecuteTemplate

type ExecuteTemplate struct {
	ConfigPath string
	JsonPath   string
	Sudo       bool
}

type FlatConfig added in v1.4.5

type FlatConfig struct {
	PackerBuildName            *string                `mapstructure:"packer_build_name" cty:"packer_build_name"`
	PackerBuilderType          *string                `mapstructure:"packer_builder_type" cty:"packer_builder_type"`
	PackerDebug                *bool                  `mapstructure:"packer_debug" cty:"packer_debug"`
	PackerForce                *bool                  `mapstructure:"packer_force" cty:"packer_force"`
	PackerOnError              *string                `mapstructure:"packer_on_error" cty:"packer_on_error"`
	PackerUserVars             map[string]string      `mapstructure:"packer_user_variables" cty:"packer_user_variables"`
	PackerSensitiveVars        []string               `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables"`
	ChefEnvironment            *string                `mapstructure:"chef_environment" cty:"chef_environment"`
	ChefLicense                *string                `mapstructure:"chef_license" cty:"chef_license"`
	ConfigTemplate             *string                `mapstructure:"config_template" cty:"config_template"`
	CookbookPaths              []string               `mapstructure:"cookbook_paths" cty:"cookbook_paths"`
	RolesPath                  *string                `mapstructure:"roles_path" cty:"roles_path"`
	DataBagsPath               *string                `mapstructure:"data_bags_path" cty:"data_bags_path"`
	EncryptedDataBagSecretPath *string                `mapstructure:"encrypted_data_bag_secret_path" cty:"encrypted_data_bag_secret_path"`
	EnvironmentsPath           *string                `mapstructure:"environments_path" cty:"environments_path"`
	ExecuteCommand             *string                `mapstructure:"execute_command" cty:"execute_command"`
	InstallCommand             *string                `mapstructure:"install_command" cty:"install_command"`
	RemoteCookbookPaths        []string               `mapstructure:"remote_cookbook_paths" cty:"remote_cookbook_paths"`
	Json                       map[string]interface{} `cty:"json"`
	PreventSudo                *bool                  `mapstructure:"prevent_sudo" cty:"prevent_sudo"`
	RunList                    []string               `mapstructure:"run_list" cty:"run_list"`
	SkipInstall                *bool                  `mapstructure:"skip_install" cty:"skip_install"`
	StagingDir                 *string                `mapstructure:"staging_directory" cty:"staging_directory"`
	GuestOSType                *string                `mapstructure:"guest_os_type" cty:"guest_os_type"`
	Version                    *string                `mapstructure:"version" cty:"version"`
}

FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConfig) HCL2Spec added in v1.4.5

func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Config. This spec is used by HCL to read the fields of Config. The decoded values from this spec will then be applied to a FlatConfig.

type InstallChefTemplate

type InstallChefTemplate struct {
	Sudo    bool
	Version string
}

type Provisioner

type Provisioner struct {
	// contains filtered or unexported fields
}

func (*Provisioner) ConfigSpec added in v1.5.0

func (p *Provisioner) ConfigSpec() hcldec.ObjectSpec

func (*Provisioner) Prepare

func (p *Provisioner) Prepare(raws ...interface{}) error

func (*Provisioner) Provision

func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.Communicator, _ map[string]interface{}) error

Jump to

Keyboard shortcuts

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