summaryrefslogtreecommitdiff
path: root/lib/ansible/callbacks.py
diff options
context:
space:
mode:
authorScott Sturdivant <scott.sturdivant@absio.com>2013-06-17 14:15:31 -0600
committerScott Sturdivant <scott.sturdivant@absio.com>2013-06-17 14:15:31 -0600
commitb10b676158fcb55d80c9e280a3474ec703e8a271 (patch)
tree3cc5938137060cd1dbe1c9a88c4342aa96c4b51c /lib/ansible/callbacks.py
parentbfcead8c33192d7cc2ee332ed39136f88e3bd907 (diff)
downloadansible-b10b676158fcb55d80c9e280a3474ec703e8a271.tar.gz
Print the default value if one is provided.
Diffstat (limited to 'lib/ansible/callbacks.py')
-rw-r--r--lib/ansible/callbacks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py
index 39e81a0886..caf28f8c8b 100644
--- a/lib/ansible/callbacks.py
+++ b/lib/ansible/callbacks.py
@@ -581,7 +581,9 @@ class PlaybookCallbacks(object):
def on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
- if prompt:
+ if prompt and default:
+ msg = "%s [%s]: " % (prompt, default)
+ elif prompt:
msg = "%s: " % prompt
else:
msg = 'input for %s: ' % varname