mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
Expand sudo_user after variable merging
Previous commit c3659741
expanded sudo_user during task construction,
but this is too early as it does not pick up variables set during
the play.
This commit moves sudo_user expansion to the runner after variables
have been merged.
This commit is contained in:
parent
cf2ddb6f80
commit
d65f45f0b2
2 changed files with 5 additions and 1 deletions
|
@ -115,7 +115,7 @@ class Task(object):
|
|||
self.args = ds.get('args', {})
|
||||
|
||||
if self.sudo:
|
||||
self.sudo_user = template.template(play.basedir, ds.get('sudo_user', play.sudo_user), module_vars)
|
||||
self.sudo_user = ds.get('sudo_user', play.sudo_user)
|
||||
self.sudo_pass = ds.get('sudo_pass', play.playbook.sudo_pass)
|
||||
else:
|
||||
self.sudo_user = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue