From 6cc9b16f06e44f9f24cb4d499fd07980b441e5ab Mon Sep 17 00:00:00 2001 From: Niku Toivola Date: Mon, 20 Jan 2014 19:06:42 +0200 Subject: [PATCH] allow templating of ansible_ssh_private_key_file also in the synchronize module --- lib/ansible/runner/action_plugins/synchronize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/runner/action_plugins/synchronize.py b/lib/ansible/runner/action_plugins/synchronize.py index 2af14206b8..e7dd54127b 100644 --- a/lib/ansible/runner/action_plugins/synchronize.py +++ b/lib/ansible/runner/action_plugins/synchronize.py @@ -135,6 +135,8 @@ class ActionModule(object): else: private_key = inject.get('ansible_ssh_private_key_file', self.runner.private_key_file) + private_key = template.template(self.runner.basedir, private_key, inject, fail_on_undefined=True) + if not private_key is None: private_key = os.path.expanduser(private_key) options['private_key'] = private_key