Merge pull request #4649 from mitchellh/forcederegister
builder/amazon: set force_deregister to true on -force
This commit is contained in:
commit
9de7e65b73
|
@ -78,6 +78,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.config.PackerConfig.PackerForce {
|
||||||
|
b.config.AMIForceDeregister = true
|
||||||
|
}
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
if b.config.ChrootMounts == nil {
|
if b.config.ChrootMounts == nil {
|
||||||
b.config.ChrootMounts = make([][]string, 0)
|
b.config.ChrootMounts = make([][]string, 0)
|
||||||
|
|
|
@ -58,6 +58,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.config.PackerConfig.PackerForce {
|
||||||
|
b.config.AMIForceDeregister = true
|
||||||
|
}
|
||||||
|
|
||||||
// Accumulate any errors
|
// Accumulate any errors
|
||||||
var errs *packer.MultiError
|
var errs *packer.MultiError
|
||||||
errs = packer.MultiErrorAppend(errs, b.config.AccessConfig.Prepare(&b.config.ctx)...)
|
errs = packer.MultiErrorAppend(errs, b.config.AccessConfig.Prepare(&b.config.ctx)...)
|
||||||
|
|
|
@ -58,6 +58,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.config.PackerConfig.PackerForce {
|
||||||
|
b.config.AMIForceDeregister = true
|
||||||
|
}
|
||||||
|
|
||||||
// Accumulate any errors
|
// Accumulate any errors
|
||||||
var errs *packer.MultiError
|
var errs *packer.MultiError
|
||||||
errs = packer.MultiErrorAppend(errs, b.config.AccessConfig.Prepare(&b.config.ctx)...)
|
errs = packer.MultiErrorAppend(errs, b.config.AccessConfig.Prepare(&b.config.ctx)...)
|
||||||
|
|
|
@ -77,6 +77,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.config.PackerConfig.PackerForce {
|
||||||
|
b.config.AMIForceDeregister = true
|
||||||
|
}
|
||||||
|
|
||||||
if b.config.BundleDestination == "" {
|
if b.config.BundleDestination == "" {
|
||||||
b.config.BundleDestination = "/tmp"
|
b.config.BundleDestination = "/tmp"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue