From 7ac665a0aa169c0f3f4e0b586eb5998f481001cd Mon Sep 17 00:00:00 2001 From: jovial Date: Fri, 25 Mar 2022 12:00:30 +0000 Subject: [PATCH] Support templating in ansible_user Before this change it is not possible to use templating for the ansible_user e.g: ansible_user: "{{ some_variable }}" --- plugins/action/synchronize.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/action/synchronize.py b/plugins/action/synchronize.py index a5752b9..36751d4 100644 --- a/plugins/action/synchronize.py +++ b/plugins/action/synchronize.py @@ -347,6 +347,7 @@ class ActionModule(ActionBase): else: user = task_vars.get('ansible_user') or self._play_context.remote_user + user = self._templar.template(user) # Private key handling # Use the private_key parameter if passed else use context private_key_file