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.
This commit is contained in:
Dag Wieers 2012-09-24 22:37:51 +02:00
parent 3939f7a812
commit 069feb5d9c

View file

@ -165,7 +165,7 @@ class Play(object):
raise errors.AnsibleError("'vars_prompt' item is missing 'name:'") raise errors.AnsibleError("'vars_prompt' item is missing 'name:'")
vname = var['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) private = var.get("private", True)
confirm = var.get("confirm", False) confirm = var.get("confirm", False)