Removed default value for ssh_username

This commit is contained in:
jasminSPC
2016-11-17 21:15:28 +01:00
parent 5649940fab
commit 68ca7490bb
4 changed files with 3 additions and 8 deletions
-4
View File
@@ -65,10 +65,6 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
errs, errors.New("1&1 'image' is required"))
}
if c.Comm.SSHUsername == "" {
c.Comm.SSHUsername = "root"
}
if c.Token == "" {
c.Token = os.Getenv("ONEANDONE_TOKEN")
}
-3
View File
@@ -56,9 +56,6 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
errs = packer.MultiErrorAppend(
errs, errors.New("Either ssh private key path or ssh password must be set."))
}
if c.Comm.SSHUsername == "" {
c.Comm.SSHUsername = "root"
}
if c.SnapshotName == "" {
def, err := interpolate.Render("packer-{{timestamp}}", nil)
@@ -53,7 +53,8 @@ Here is a basic example:
"type":"oneandone",
"disk_size":"50",
"image_name":"test5",
"source_image_name":"ubuntu1604-64min"
"source_image_name":"ubuntu1604-64min",
"ssh_username" :"root"
}
]
}
@@ -65,6 +65,7 @@ Here is a basic example:
"snapshot_name": "double",
"ssh_key_path": "/path/to/private/key",
"snapshot_password": "test1234",
"ssh_username" :"root",
"timeout": 100
}
]