fixed delegate_to ref in syncronize
This commit is contained in:
parent
8a00dff989
commit
9aa4214417
1 changed files with 2 additions and 4 deletions
|
@ -140,14 +140,12 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
user = None
|
user = None
|
||||||
if boolean(task_vars.get('set_remote_user', 'yes')):
|
if boolean(task_vars.get('set_remote_user', 'yes')):
|
||||||
if use_delegate:
|
|
||||||
user = task_vars['hostvars'][conn.delegate].get('ansible_ssh_user')
|
|
||||||
|
|
||||||
if not use_delegate or not user:
|
if not use_delegate or not user:
|
||||||
user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
||||||
|
elif use_delegate:
|
||||||
|
user = task_vars['hostvars'][task_vars.get('delegate_to')].get('ansible_ssh_user')
|
||||||
|
|
||||||
if use_delegate:
|
if use_delegate:
|
||||||
# FIXME
|
|
||||||
private_key = task_vars.get('ansible_ssh_private_key_file') or self._play_context.private_key_file
|
private_key = task_vars.get('ansible_ssh_private_key_file') or self._play_context.private_key_file
|
||||||
else:
|
else:
|
||||||
private_key = task_vars.get('ansible_ssh_private_key_file') or self._play_context.private_key_file
|
private_key = task_vars.get('ansible_ssh_private_key_file') or self._play_context.private_key_file
|
||||||
|
|
Loading…
Reference in a new issue