Merge pull request #7893 from StefanScherer/inspec-input-file

Use inspec --input-file instead of --attrs to avoid deprecation warning
This commit is contained in:
Megan Marsh 2019-07-22 12:34:10 -07:00 committed by GitHub
commit 2934e0c621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -342,7 +342,7 @@ func (p *Provisioner) executeInspec(ui packer.Ui, comm packer.Communicator, priv
args = append(args, "--port", strconv.Itoa(p.config.LocalPort)) args = append(args, "--port", strconv.Itoa(p.config.LocalPort))
} }
args = append(args, "--attrs") args = append(args, "--input-file")
args = append(args, p.config.AttributesFiles...) args = append(args, p.config.AttributesFiles...)
args = append(args, p.config.ExtraArguments...) args = append(args, p.config.ExtraArguments...)

View File

@ -67,15 +67,15 @@ Optional Parameters:
``` ```
- `attributes` (array of strings) - Attribute Files used by InSpec which will - `attributes` (array of strings) - Attribute Files used by InSpec which will
be passed to the `--attrs` argument of the `inspec` command when this be passed to the `--input-file` argument of the `inspec` command when this
provisioner runs InSpec. Specify this if you want a different location. provisioner runs InSpec. Specify this if you want a different location.
Note using also `"--attrs"` in `extra_arguments` will override this Note using also `"--input-file"` in `extra_arguments` will override this
setting. setting.
- `attributes_directory` (string) - The directory in which to place the - `attributes_directory` (string) - The directory in which to place the
temporary generated InSpec Attributes file. By default, this is the temporary generated InSpec Attributes file. By default, this is the
system-specific temporary file location. The fully-qualified name of this system-specific temporary file location. The fully-qualified name of this
temporary file will be passed to the `--attrs` argument of the `inspec` temporary file will be passed to the `--input-file` argument of the `inspec`
command when this provisioner runs InSpec. Specify this if you want a command when this provisioner runs InSpec. Specify this if you want a
different location. different location.