mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Use argument type checking to convert to boolean
This commit is contained in:
parent
9076f8eb31
commit
df798d0688
22 changed files with 77 additions and 77 deletions
|
@ -75,7 +75,7 @@ class RabbitMqPlugins(object):
|
|||
def main():
|
||||
arg_spec = dict(
|
||||
names=dict(required=True, aliases=['name']),
|
||||
new_only=dict(default='no', choices=BOOLEANS),
|
||||
new_only=dict(default='no', choices=BOOLEANS, type='bool'),
|
||||
state=dict(default='enabled', choices=['enabled', 'disabled'])
|
||||
)
|
||||
module = AnsibleModule(
|
||||
|
@ -84,7 +84,7 @@ def main():
|
|||
)
|
||||
|
||||
names = module.params['names'].split(',')
|
||||
new_only = module.boolean(module.params['new_only'])
|
||||
new_only = module.params['new_only']
|
||||
state = module.params['state']
|
||||
|
||||
rabbitmq_plugins = RabbitMqPlugins(module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue