mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Use ssh_username if it is set
This commit is contained in:
parent
ed9be36302
commit
808dfea063
@ -131,9 +131,15 @@ def create(vm_):
|
|||||||
host_addr = data.public_ips[0]
|
host_addr = data.public_ips[0]
|
||||||
else:
|
else:
|
||||||
host_addr = None
|
host_addr = None
|
||||||
|
|
||||||
|
if 'ssh_username' in vm_:
|
||||||
|
ssh_user = vm_['ssh_username']
|
||||||
|
else:
|
||||||
|
ssh_user = 'root'
|
||||||
|
|
||||||
deployed = saltcloud.utils.deploy_script(
|
deployed = saltcloud.utils.deploy_script(
|
||||||
host=host_addr,
|
host=host_addr,
|
||||||
username='root',
|
username=ssh_user,
|
||||||
password=data.extra['password'],
|
password=data.extra['password'],
|
||||||
script=deploy_script.script,
|
script=deploy_script.script,
|
||||||
name=vm_['name'],
|
name=vm_['name'],
|
||||||
|
Loading…
Reference in New Issue
Block a user