mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-10 11:11:29 -07:00
Allow value to be bool where 'yes'/'no' are in choices (#2593)
* Changed type of 'details' argument to bool on ecs_service_facts module. * Changed type of 'autostart' argument to bool on virt_* modules. * Changed types of 'autoconnect' and 'stp' argument to bool on nmcli module. ('create_connection_bridge(self)' and 'modify_connection_bridge(self)' are not implemented yet?) * Added conversion of 'value' argument when 'vtype' is boolean on debconf module.
This commit is contained in:
parent
b54d352a69
commit
a3860ecf1e
5 changed files with 30 additions and 21 deletions
|
@ -55,7 +55,7 @@ EXAMPLES = '''
|
|||
- ecs_service_facts:
|
||||
cluster: test-cluster
|
||||
service: console-test-service
|
||||
details: "true"
|
||||
details: true
|
||||
|
||||
# Basic listing example
|
||||
- ecs_service_facts:
|
||||
|
@ -201,7 +201,7 @@ def main():
|
|||
|
||||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
details=dict(required=False, choices=['true', 'false'] ),
|
||||
details=dict(required=False, type='bool', default=False ),
|
||||
cluster=dict(required=False, type='str' ),
|
||||
service=dict(required=False, type='str' )
|
||||
))
|
||||
|
@ -214,9 +214,7 @@ def main():
|
|||
if not HAS_BOTO3:
|
||||
module.fail_json(msg='boto3 is required.')
|
||||
|
||||
show_details = False
|
||||
if 'details' in module.params and module.params['details'] == 'true':
|
||||
show_details = True
|
||||
show_details = module.params.get('details', False)
|
||||
|
||||
task_mgr = EcsServiceManager(module)
|
||||
if show_details:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue