Merge branch 'master' of https://github.com/mitchellh/packer
This commit is contained in:
commit
3b6435ec8d
|
@ -235,6 +235,14 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
return fmt.Errorf("Error uploading encrypted data bag secret: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
if p.config.ValidationKeyPath != "" {
|
||||
remoteValidationKeyPath = fmt.Sprintf("%s/validation.pem", p.config.StagingDir)
|
||||
if err := p.uploadFile(ui, comm, remoteValidationKeyPath, p.config.ValidationKeyPath); err != nil {
|
||||
return fmt.Errorf("Error copying validation key: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
configPath, err := p.createConfig(
|
||||
ui,
|
||||
comm,
|
||||
|
@ -250,13 +258,6 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
return fmt.Errorf("Error creating Chef config file: %s", err)
|
||||
}
|
||||
|
||||
if p.config.ValidationKeyPath != "" {
|
||||
remoteValidationKeyPath = fmt.Sprintf("%s/validation.pem", p.config.StagingDir)
|
||||
if err := p.uploadFile(ui, comm, remoteValidationKeyPath, p.config.ValidationKeyPath); err != nil {
|
||||
return fmt.Errorf("Error copying validation key: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
jsonPath, err := p.createJson(ui, comm)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error creating JSON attributes: %s", err)
|
||||
|
|
Loading…
Reference in New Issue