Merge pull request #6772 from fflorens/scaleway-add-boottype
scaleway: add boottype parameter in config
This commit is contained in:
commit
b7b1720a91
|
@ -30,6 +30,7 @@ type Config struct {
|
|||
ImageName string `mapstructure:"image_name"`
|
||||
ServerName string `mapstructure:"server_name"`
|
||||
Bootscript string `mapstructure:"bootscript"`
|
||||
BootType string `mapstructure:"boottype"`
|
||||
|
||||
UserAgent string
|
||||
ctx interpolate.Context
|
||||
|
@ -86,6 +87,10 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
|
|||
c.ServerName = fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID())
|
||||
}
|
||||
|
||||
if c.BootType == "" {
|
||||
c.BootType = "bootscript"
|
||||
}
|
||||
|
||||
var errs *packer.MultiError
|
||||
if es := c.Comm.Prepare(&c.ctx); len(es) > 0 {
|
||||
errs = packer.MultiErrorAppend(errs, es...)
|
||||
|
|
|
@ -38,6 +38,7 @@ func (s *stepCreateServer) Run(_ context.Context, state multistep.StateBag) mult
|
|||
CommercialType: c.CommercialType,
|
||||
Tags: tags,
|
||||
Bootscript: bootscript,
|
||||
BootType: c.BootType,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
|
|
@ -74,6 +74,9 @@ builder.
|
|||
- `snapshot_name` (string) - The name of the resulting snapshot that will
|
||||
appear in your account. Default `packer-TIMESTAMP`
|
||||
|
||||
- `boottype` (string) - The type of boot, can be either `local` or `bootscript`,
|
||||
Default `bootscript`
|
||||
|
||||
- `bootscript` (string) - The id of an existing bootscript to use when booting
|
||||
the server.
|
||||
|
||||
|
|
Loading…
Reference in New Issue