packer-provisioner-inspec icon indicating copy to clipboard operation
packer-provisioner-inspec copied to clipboard

Test and document supported inspec parameters

Open jrbeilke opened this issue 6 years ago • 1 comments

Currently the provisioner accepts the following parameters, most of which are undocumented and untested:

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

	// The command to run inspec
	Command    string
	SubCommand string

	// Extra options to pass to the inspec command
	ExtraArguments []string `mapstructure:"extra_arguments"`

	// The main test path to execute.
	TestPath             string   `mapstructure:"test_path"`
	Attrs                []string `mapstructure:"attrs"`
	Controls             []string `mapstructure:"controls"`
	Reporter             []string `mapstructure:"reporter"`
	User                 string   `mapstructure:"user"`
	LocalPort            string   `mapstructure:"local_port"`
	SSHHostKeyFile       string   `mapstructure:"ssh_host_key_file"`
	SSHAuthorizedKeyFile string   `mapstructure:"ssh_authorized_key_file"`
	ProfilesPath         string   `mapstructure:"profiles_path"`
	JsonConfig           string   `mapstructure:"json_config"`
}

Need to test and document each of these parameters to ensure they are working properly with Packer + InSpec

jrbeilke avatar Jun 27 '18 18:06 jrbeilke

Added "extra_arguments" documentation to the README with example of usage in #5

Still need to cover "attrs", "controls", "json_config", "profiles_path", "reporter", and "user" parameters.

jrbeilke avatar Jul 25 '18 15:07 jrbeilke