Further service module tweaks

This commit is contained in:
Michael DeHaan 2012-07-28 16:48:04 -04:00
parent e9c4eb36d1
commit ff82f0a168
2 changed files with 13 additions and 11 deletions

View file

@ -134,9 +134,10 @@ class AnsibleModule(object):
def boolean(self, arg):
''' return a bool for the arg '''
if arg is None or type(arg) == bool:
return arg
if type(arg) in types.StringTypes:
arg = arg.lower()
if arg in BOOLEANS_TRUE:
return True
elif arg in BOOLEANS_FALSE: