mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-10 06:35:27 +01:00
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 }}"
This commit is contained in:
parent
62d060a173
commit
7ac665a0aa
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue