From 52c9e2ffcf43506befcbfcb02476f08b40a0c823 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 25 May 2016 10:34:55 -0700 Subject: [PATCH] Add strings 'True' and 'False' as booleans as python bools converted to strings will look that way. Workaround for custom modules which are using choices=BOOLEANS instead of type='bool'. --- lib/ansible/module_utils/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index cc206c92f8a..d87f18cbd3b 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -27,8 +27,8 @@ # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -BOOLEANS_TRUE = ['yes', 'on', '1', 'true', 1, True] -BOOLEANS_FALSE = ['no', 'off', '0', 'false', 0, False] +BOOLEANS_TRUE = ['yes', 'on', '1', 'true', 'True', 1, True] +BOOLEANS_FALSE = ['no', 'off', '0', 'false', 'False', 0, False] BOOLEANS = BOOLEANS_TRUE + BOOLEANS_FALSE # ansible modules can be written in any language. To simplify