mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Further service module tweaks
This commit is contained in:
parent
e9c4eb36d1
commit
ff82f0a168
2 changed files with 13 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue