From f326e49d752092e41b6f1226df74a9259b8abf1c Mon Sep 17 00:00:00 2001 From: ovcharenko Date: Thu, 4 Aug 2016 21:27:44 +0300 Subject: [PATCH] Fix for issue @synchronize doesn't substitute variables properly #16347 (#16349) * Fix for issue @synchronize doesn't substitute variables properly #16347 --- lib/ansible/plugins/action/synchronize.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 66a7fc0e203..62b8292be87 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -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)