only set role name if it's set.
This commit is contained in:
parent
00a55e209a
commit
48e12b6bee
|
@ -64,10 +64,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
|
||||||
p.config.S3Key = "packer-import-{{timestamp}}.ova"
|
p.config.S3Key = "packer-import-{{timestamp}}.ova"
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.config.RoleName == "" {
|
|
||||||
p.config.RoleName = "vmimport"
|
|
||||||
}
|
|
||||||
|
|
||||||
errs := new(packer.MultiError)
|
errs := new(packer.MultiError)
|
||||||
|
|
||||||
// Check and render s3_key_name
|
// Check and render s3_key_name
|
||||||
|
@ -169,7 +165,10 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
RoleName: &p.config.RoleName,
|
}
|
||||||
|
|
||||||
|
if p.config.RoleName != "" {
|
||||||
|
params.SetRoleName(p.config.RoleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.config.LicenseType != "" {
|
if p.config.LicenseType != "" {
|
||||||
|
|
Loading…
Reference in New Issue