fixed indent when looking at delegate_to vars
This commit is contained in:
parent
d5a7cd0efc
commit
09efba2a7c
1 changed files with 5 additions and 5 deletions
|
@ -394,11 +394,11 @@ class Runner(object):
|
||||||
if inject['hostvars'][host].get('ansible_ssh_user'):
|
if inject['hostvars'][host].get('ansible_ssh_user'):
|
||||||
# user for delegate host in inventory
|
# user for delegate host in inventory
|
||||||
thisuser = inject['hostvars'][host].get('ansible_ssh_user')
|
thisuser = inject['hostvars'][host].get('ansible_ssh_user')
|
||||||
else:
|
else:
|
||||||
# look up the variables for the host directly from inventory
|
# look up the variables for the host directly from inventory
|
||||||
host_vars = self.inventory.get_variables(host, vault_password=self.vault_pass)
|
host_vars = self.inventory.get_variables(host, vault_password=self.vault_pass)
|
||||||
if 'ansible_ssh_user' in host_vars:
|
if 'ansible_ssh_user' in host_vars:
|
||||||
thisuser = host_vars['ansible_ssh_user']
|
thisuser = host_vars['ansible_ssh_user']
|
||||||
except errors.AnsibleError, e:
|
except errors.AnsibleError, e:
|
||||||
# the hostname was not found in the inventory, so
|
# the hostname was not found in the inventory, so
|
||||||
# we just ignore this and try the next method
|
# we just ignore this and try the next method
|
||||||
|
|
Loading…
Reference in a new issue