salt-cloud/vmware if specified use ssh_host to deploy

Fixes #36543
This commit is contained in:
Christophe Vedel 2018-04-17 11:17:12 +02:00
parent 5852993f0f
commit eb918874ec

View File

@ -2803,7 +2803,9 @@ def create(vm_):
# ssh or smb using ip and install salt only if deploy is True
if deploy:
vm_['key_filename'] = key_filename
vm_['ssh_host'] = ip
# if specified, prefer ssh_host to the discovered ip address
vm_['ssh_host'] = vm_.get('ssh_host', ip)
log.info("[ {0} ] Deploying to {1}".format(vm_name, vm_['ssh_host']))
out = __utils__['cloud.bootstrap'](vm_, __opts__)