puppetserver

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: 12 Imported by: 0

Documentation

Overview

Package puppetserver implements a provisioner for Packer that executes Puppet on the remote machine connecting to a Puppet master.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

	// If true, staging directory is removed after executing puppet.
	CleanStagingDir bool `mapstructure:"clean_staging_directory"`

	// A path to the client certificate
	ClientCertPath string `mapstructure:"client_cert_path"`

	// A path to a directory containing the client private keys
	ClientPrivateKeyPath string `mapstructure:"client_private_key_path"`

	// The command used to execute Puppet.
	ExecuteCommand string `mapstructure:"execute_command"`

	// Additional argument to pass when executing Puppet.
	ExtraArguments []string `mapstructure:"extra_arguments"`

	// Additional facts to set when executing Puppet
	Facter map[string]string

	// The Guest OS Type (unix or windows)
	GuestOSType string `mapstructure:"guest_os_type"`

	// If true, packer will ignore all exit-codes from a puppet run
	IgnoreExitCodes bool `mapstructure:"ignore_exit_codes"`

	// If true, `sudo` will NOT be used to execute Puppet.
	PreventSudo bool `mapstructure:"prevent_sudo"`

	// The directory that contains the puppet binary.
	// E.g. if it can't be found on the standard path.
	PuppetBinDir string `mapstructure:"puppet_bin_dir"`

	// The hostname of the Puppet node.
	PuppetNode string `mapstructure:"puppet_node"`

	// The hostname of the Puppet server.
	PuppetServer string `mapstructure:"puppet_server"`

	// The directory where files will be uploaded. Packer requires write
	// permissions in this directory.
	StagingDir string `mapstructure:"staging_dir"`

	// The directory from which the command will be executed.
	// Packer requires the directory to exist when running puppet.
	WorkingDir string `mapstructure:"working_directory"`

	// Instructs the communicator to run the remote script as a Windows
	// scheduled task, effectively elevating the remote user by impersonating
	// a logged-in user
	ElevatedUser     string `mapstructure:"elevated_user"`
	ElevatedPassword string `mapstructure:"elevated_password"`
	// 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 EnvVarsTemplate added in v1.3.4

type EnvVarsTemplate struct {
	WinRMPassword string
}

type ExecuteTemplate

type ExecuteTemplate struct {
	ClientCertPath       string
	ClientPrivateKeyPath string
	Debug                bool
	ExtraArguments       string
	FacterVars           string
	PuppetNode           string
	PuppetServer         string
	PuppetBinDir         string
	Sudo                 bool
	WorkingDir           string
}

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"`
	CleanStagingDir      *bool             `mapstructure:"clean_staging_directory" cty:"clean_staging_directory"`
	ClientCertPath       *string           `mapstructure:"client_cert_path" cty:"client_cert_path"`
	ClientPrivateKeyPath *string           `mapstructure:"client_private_key_path" cty:"client_private_key_path"`
	ExecuteCommand       *string           `mapstructure:"execute_command" cty:"execute_command"`
	ExtraArguments       []string          `mapstructure:"extra_arguments" cty:"extra_arguments"`
	Facter               map[string]string `cty:"facter"`
	GuestOSType          *string           `mapstructure:"guest_os_type" cty:"guest_os_type"`
	IgnoreExitCodes      *bool             `mapstructure:"ignore_exit_codes" cty:"ignore_exit_codes"`
	PreventSudo          *bool             `mapstructure:"prevent_sudo" cty:"prevent_sudo"`
	PuppetBinDir         *string           `mapstructure:"puppet_bin_dir" cty:"puppet_bin_dir"`
	PuppetNode           *string           `mapstructure:"puppet_node" cty:"puppet_node"`
	PuppetServer         *string           `mapstructure:"puppet_server" cty:"puppet_server"`
	StagingDir           *string           `mapstructure:"staging_dir" cty:"staging_dir"`
	WorkingDir           *string           `mapstructure:"working_directory" cty:"working_directory"`
	ElevatedUser         *string           `mapstructure:"elevated_user" cty:"elevated_user"`
	ElevatedPassword     *string           `mapstructure:"elevated_password" cty:"elevated_password"`
}

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 Provisioner

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

func (*Provisioner) Communicator added in v1.3.4

func (p *Provisioner) Communicator() packer.Communicator

func (*Provisioner) ConfigSpec added in v1.5.0

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

func (*Provisioner) ElevatedPassword added in v1.3.4

func (p *Provisioner) ElevatedPassword() string

func (*Provisioner) ElevatedUser added in v1.3.4

func (p *Provisioner) ElevatedUser() string

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, generatedData map[string]interface{}) error

Jump to

Keyboard shortcuts

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