1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #5714 from eggsby/patch-2

Allow templates in ansible_sudo_pass inventory var
This commit is contained in:
Michael DeHaan 2014-03-16 15:42:12 -05:00
commit 6144c5e1e2

View file

@ -758,6 +758,7 @@ class Runner(object):
# user/pass may still contain variables at this stage
actual_user = template.template(self.basedir, actual_user, inject)
actual_pass = template.template(self.basedir, actual_pass, inject)
self.sudo_pass = template.template(self.basedir, self.sudo_pass, inject)
# make actual_user available as __magic__ ansible_ssh_user variable
inject['ansible_ssh_user'] = actual_user