From d0eba797608f3f83e1e8542f5248274891a6d8bc Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 30 Sep 2012 20:11:51 -0400 Subject: [PATCH] Template out sudo_user so you can pass in variables using --extra-vars --- lib/ansible/playbook/play.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 2d1f8856c0..bb73d09b0d 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -72,7 +72,7 @@ class Play(object): self.remote_user = utils.template(basedir, ds.get('user', self.playbook.remote_user), playbook.extra_vars) self.remote_port = ds.get('port', self.playbook.remote_port) self.sudo = ds.get('sudo', self.playbook.sudo) - self.sudo_user = ds.get('sudo_user', self.playbook.sudo_user) + self.sudo_user = utils.template(basedir, ds.get('sudo_user', self.playbook.sudo_user), playbook.extra_vars) self.transport = ds.get('connection', self.playbook.transport) self.tags = ds.get('tags', None) self.gather_facts = ds.get('gather_facts', True)