From 069feb5d9c76a0195ec3a262c8940bbe65cf3b7e Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Mon, 24 Sep 2012 22:37:51 +0200 Subject: [PATCH] Template the variable prompt to customize the message We have a password-prompt for a configurable login name. Since we require to ask the password for this specific login, it is important to indicate what password needs to be prov ided on the prompt. So the prompt needs to be templated. That's what this patch does. --- 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 e2b57064e7b..a2b730745ac 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -165,7 +165,7 @@ class Play(object): raise errors.AnsibleError("'vars_prompt' item is missing 'name:'") vname = var['name'] - prompt = "%s: " % var.get("prompt", vname) + prompt = util.template(None, "%s: " % var.get("prompt", vname), self.vars) private = var.get("private", True) confirm = var.get("confirm", False)