Fix for issue @synchronize doesn't substitute variables properly #16347 (#16349)

* Fix for issue @synchronize doesn't substitute variables properly #16347
This commit is contained in:
ovcharenko 2016-08-04 21:27:44 +03:00 committed by Toshio Kuratomi
parent 595946b80e
commit f326e49d75

View file

@ -272,10 +272,7 @@ class ActionModule(ActionBase):
if not dest_is_local:
# Private key handling
if use_delegate:
private_key = task_vars.get('ansible_ssh_private_key_file') or self._play_context.private_key_file
else:
private_key = task_vars.get('ansible_ssh_private_key_file') or self._play_context.private_key_file
private_key = self._play_context.private_key_file
if private_key is not None:
private_key = os.path.expanduser(private_key)