Documentation
¶
Overview ¶
Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
Package dsc implements a provisioner for Packer that executes DSC on the remote machine, configured to apply a local manifest versus connecting to a DSC push server.
NOTE: This has only been tested on Windows environments
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"` // The command used to execute DSC. ExecuteCommand string `mapstructure:"execute_command"` // The file containing the command to execute DSC ExecuteCommandFilePath string `mapstructure:"execute_command_file"` // Set of Parameters to pass to the DSC Configuration. ConfigurationParams map[string]string `mapstructure:"configuration_params"` // Relative path to a folder, containing the pre-generated MOF file. // // Path is relative to the folder containing the Packer json. MofPath string `mapstructure:"mof_path"` // Relative path to the DSC Configuration Data file. // // Configuration data is used to parameterise the configuration_file. // // Path is relative to the folder containing the Packer json. ConfigurationFilePath string `mapstructure:"configuration_file"` // Relative path to the folder containing the root Configuration manifest file. // Defaults to 'manifests'. // // Path is relative to the folder containing the Packer json. ManifestDir string `mapstructure:"manifest_dir"` // The main DSC manifest file to apply to kick off the entire thing. // // Path is relative to the folder containing the Packer json. ManifestFile string `mapstructure:"manifest_file"` // The name of the Configuration module // // Defaults to the basename of the "configuration_file" // e.g. "Foo.ps1" becomes "Foo" ConfigurationName string `mapstructure:"configuration_name"` // Set of module paths relative to the Packer json dir. // // These paths are added to the DSC Configuration running // environment to enable local modules to be addressed. ModulePaths []string `mapstructure:"module_paths"` // Set of DSC resources to upload for system-wide use. // // These paths are uploaded into %SystemDrive%\WindowsPowershell\Modules // to be used system-wide. ResourcePaths []string `mapstructure:"resource_paths"` // Install the latest Windows PackageManagement software? InstallPackageManagement bool `mapstructure:"install_package_management"` // Modules to install, using the latest PackageManagement tooling // e.g. { "xWebAdministration": "1.0.0.0" } // // See InstallPackageManagement if InstallModules map[string]string `mapstructure:"install_modules"` // The directory where files will be uploaded. Packer requires write // permissions in this directory. StagingDir string `mapstructure:"staging_dir"` // If true, staging directory is removed after executing dsc. CleanStagingDir bool `mapstructure:"clean_staging_dir"` // The directory from which the command will be executed. // Packer requires the directory to exist when running dsc. WorkingDir string `mapstructure:"working_dir"` // If true, packer will ignore all exit-codes from a dsc run IgnoreExitCodes bool `mapstructure:"ignore_exit_codes"` // contains filtered or unexported fields }
type ExecuteTemplate ¶
type ExecuteTemplate struct { WorkingDir string ConfigurationParams string ConfigurationFilePath string ConfigurationName string ModulePath string ManifestFile string ManifestDir string MofPath string }
ExecuteTemplate contains the template variables interpolated into the running DSC script
type FlatConfig ¶
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"` ExecuteCommand *string `mapstructure:"execute_command" cty:"execute_command"` ExecuteCommandFilePath *string `mapstructure:"execute_command_file" cty:"execute_command_file"` ConfigurationParams map[string]string `mapstructure:"configuration_params" cty:"configuration_params"` MofPath *string `mapstructure:"mof_path" cty:"mof_path"` ConfigurationFilePath *string `mapstructure:"configuration_file" cty:"configuration_file"` ManifestDir *string `mapstructure:"manifest_dir" cty:"manifest_dir"` ManifestFile *string `mapstructure:"manifest_file" cty:"manifest_file"` ConfigurationName *string `mapstructure:"configuration_name" cty:"configuration_name"` ModulePaths []string `mapstructure:"module_paths" cty:"module_paths"` ResourcePaths []string `mapstructure:"resource_paths" cty:"resource_paths"` InstallPackageManagement *bool `mapstructure:"install_package_management" cty:"install_package_management"` InstallModules map[string]string `mapstructure:"install_modules" cty:"install_modules"` StagingDir *string `mapstructure:"staging_dir" cty:"staging_dir"` CleanStagingDir *bool `mapstructure:"clean_staging_dir" cty:"clean_staging_dir"` WorkingDir *string `mapstructure:"working_dir" cty:"working_dir"` IgnoreExitCodes *bool `mapstructure:"ignore_exit_codes" cty:"ignore_exit_codes"` }
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type Provisioner ¶
type Provisioner struct {
// contains filtered or unexported fields
}
Provisioner DSC
func (*Provisioner) Cancel ¶
func (p *Provisioner) Cancel()
Cancel a running DSC session. This is a no-op
func (*Provisioner) ConfigSpec ¶
func (p *Provisioner) ConfigSpec() hcldec.ObjectSpec
func (*Provisioner) Prepare ¶
func (p *Provisioner) Prepare(raws ...interface{}) error
Prepare sets up the DSC configuration
Click to show internal directories.
Click to hide internal directories.