mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Print the default value if one is provided.
This commit is contained in:
parent
bfcead8c33
commit
b10b676158
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue