Fix template call.
This commit is contained in:
parent
0be04d2b57
commit
7931597a6a
1 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
from ansible import errors
|
from ansible import errors
|
||||||
from ansible import utils
|
from ansible import utils
|
||||||
|
import ansible.utils.template as template
|
||||||
|
|
||||||
class Task(object):
|
class Task(object):
|
||||||
|
|
||||||
|
@ -98,7 +98,9 @@ class Task(object):
|
||||||
self.args = ds.get('args', {})
|
self.args = ds.get('args', {})
|
||||||
|
|
||||||
if self.sudo:
|
if self.sudo:
|
||||||
self.sudo_user = utils.template(play.basedir, ds.get('sudo_user', play.sudo_user), play.vars)
|
# this extra template call shouldn't be needed due to play template
|
||||||
|
# TODO: verify that this is true
|
||||||
|
self.sudo_user = template.template(play.basedir, ds.get('sudo_user', play.sudo_user), play.vars)
|
||||||
self.sudo_pass = ds.get('sudo_pass', play.playbook.sudo_pass)
|
self.sudo_pass = ds.get('sudo_pass', play.playbook.sudo_pass)
|
||||||
else:
|
else:
|
||||||
self.sudo_user = None
|
self.sudo_user = None
|
||||||
|
|
Loading…
Reference in a new issue