From 46ec238613a77bf0a6af6eb86aaa8d3d6ef45346 Mon Sep 17 00:00:00 2001 From: Jim Kleckner Date: Fri, 18 Apr 2014 12:01:26 -0700 Subject: [PATCH] Fix #7057 missing False default for vars_prompt The test for default should be "is not None" since a boolean value of False is a valid value. See discussion at: https://groups.google.com/forum/#!topic/ansible-project/oc1_zE-FnyI --- lib/ansible/callbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 1abfe681cc5..cbfd315e366 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -643,7 +643,7 @@ 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 and default: + if prompt and default is not None: msg = "%s [%s]: " % (prompt, default) elif prompt: msg = "%s: " % prompt