diff --git a/changelogs/fragments/978-bools.yml b/changelogs/fragments/978-bools.yml new file mode 100644 index 00000000000..8021fe7f256 --- /dev/null +++ b/changelogs/fragments/978-bools.yml @@ -0,0 +1,2 @@ +trivial: +- various modules - Adjust booleans from ``yes``/``no`` to ``true``/``false`` in docs (https://github.com/ansible-collections/amazon.aws/pull/978). diff --git a/plugins/modules/cloudformation.py b/plugins/modules/cloudformation.py index 3b4d4312f32..a23397f8613 100644 --- a/plugins/modules/cloudformation.py +++ b/plugins/modules/cloudformation.py @@ -257,7 +257,7 @@ stack_name: my_stack state: present template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template - termination_protection: yes + termination_protection: true # Configure TimeoutInMinutes before the stack status becomes CREATE_FAILED # In this case, if disable_rollback is not set or is set to false, the stack will be rolled back. diff --git a/plugins/modules/cloudformation_info.py b/plugins/modules/cloudformation_info.py index b2355e3fdaa..2090451b51a 100644 --- a/plugins/modules/cloudformation_info.py +++ b/plugins/modules/cloudformation_info.py @@ -98,7 +98,7 @@ - name: try to get info about a stack but fail if it doesn't exist amazon.aws.cloudformation_info: stack_name: nonexistent-stack - all_facts: yes + all_facts: true failed_when: cloudformation['nonexistent-stack'] is undefined ''' diff --git a/plugins/modules/ec2_ami.py b/plugins/modules/ec2_ami.py index 39979e3438b..d5bd2015f7a 100644 --- a/plugins/modules/ec2_ami.py +++ b/plugins/modules/ec2_ami.py @@ -80,7 +80,7 @@ type: str description: - The device name. For example C(/dev/sda). - required: yes + required: true virtual_name: type: str description: @@ -162,7 +162,7 @@ - name: Basic AMI Creation amazon.aws.ec2_ami: instance_id: i-xxxxxx - wait: yes + wait: true name: newtest tags: Name: newtest @@ -212,7 +212,7 @@ delete_on_termination: true volume_type: gp2 - device_name: /dev/sdb - no_device: yes + no_device: true - name: Deregister/Delete AMI (keep associated snapshots) amazon.aws.ec2_ami: diff --git a/plugins/modules/ec2_ami_info.py b/plugins/modules/ec2_ami_info.py index 3e70d0ee05f..f0e61e1d041 100644 --- a/plugins/modules/ec2_ami_info.py +++ b/plugins/modules/ec2_ami_info.py @@ -43,7 +43,7 @@ describe_image_attributes: description: - Describe attributes (like launchPermission) of the images found. - default: no + default: false type: bool extends_documentation_fragment: @@ -140,7 +140,7 @@ sample: machine launch_permissions: description: A List of AWS accounts may launch the AMI. - returned: When image is owned by calling account and I(describe_image_attributes) is yes. + returned: When image is owned by calling account and I(describe_image_attributes=true). type: list elements: dict contains: diff --git a/plugins/modules/ec2_snapshot.py b/plugins/modules/ec2_snapshot.py index 08e0407a5b1..07854bfcc3f 100644 --- a/plugins/modules/ec2_snapshot.py +++ b/plugins/modules/ec2_snapshot.py @@ -46,7 +46,7 @@ - Wait for the snapshot to be ready. type: bool required: false - default: yes + default: true wait_timeout: description: - How long before wait gives up, in seconds. diff --git a/plugins/modules/ec2_vol.py b/plugins/modules/ec2_vol.py index c8fc036a764..39a5300d842 100644 --- a/plugins/modules/ec2_vol.py +++ b/plugins/modules/ec2_vol.py @@ -142,7 +142,7 @@ - amazon.aws.ec2: keypair: "{{ keypair }}" image: "{{ image }}" - wait: yes + wait: true count: 3 register: ec2 - amazon.aws.ec2_vol: @@ -160,7 +160,7 @@ image: "{{ image }}" zone: YYYYYY id: my_instance - wait: yes + wait: true count: 1 register: ec2 @@ -202,7 +202,7 @@ instance: XXXXXX id: XXXXXX device_name: /dev/sdf - delete_on_termination: yes + delete_on_termination: true ''' RETURN = ''' diff --git a/plugins/modules/ec2_vpc_dhcp_option.py b/plugins/modules/ec2_vpc_dhcp_option.py index 7c295aa82db..a731884fbda 100644 --- a/plugins/modules/ec2_vpc_dhcp_option.py +++ b/plugins/modules/ec2_vpc_dhcp_option.py @@ -66,7 +66,7 @@ will be ignored, and the old DHCP option set will be preserved, if it is in use by any other VPC. (Otherwise, AWS will return an error.) type: bool - default: 'yes' + default: true inherit_existing: description: - For any DHCP options not specified in these parameters, whether to diff --git a/plugins/modules/ec2_vpc_endpoint.py b/plugins/modules/ec2_vpc_endpoint.py index 9c764f5d824..cfd27988d59 100644 --- a/plugins/modules/ec2_vpc_endpoint.py +++ b/plugins/modules/ec2_vpc_endpoint.py @@ -87,7 +87,7 @@ - Unfortunately this is ignored for delete actions due to a difference in behaviour from AWS. required: false - default: no + default: false type: bool wait_timeout: description: diff --git a/plugins/modules/ec2_vpc_nat_gateway.py b/plugins/modules/ec2_vpc_nat_gateway.py index e65ce2fd6b3..25c4d41a9e6 100644 --- a/plugins/modules/ec2_vpc_nat_gateway.py +++ b/plugins/modules/ec2_vpc_nat_gateway.py @@ -152,7 +152,7 @@ state: absent nat_gateway_id: nat-12345678 release_eip: true - wait: yes + wait: true wait_timeout: 300 region: ap-southeast-2 @@ -172,10 +172,10 @@ subnet_id: subnet-12345678 allocation_id: eipalloc-12345678 region: ap-southeast-2 - purge_tags: no + purge_tags: false tags: Tag3: tag3 - wait: yes + wait: true register: update_tags_nat_gateway ''' diff --git a/plugins/modules/ec2_vpc_net.py b/plugins/modules/ec2_vpc_net.py index d6138158c70..872c6a45042 100644 --- a/plugins/modules/ec2_vpc_net.py +++ b/plugins/modules/ec2_vpc_net.py @@ -50,7 +50,7 @@ purge_cidrs: description: - Remove CIDRs that are associated with the VPC and are not specified in I(cidr_block). - default: no + default: false type: bool tenancy: description: diff --git a/plugins/modules/elb_classic_lb.py b/plugins/modules/elb_classic_lb.py index ec11f585514..353e122b965 100644 --- a/plugins/modules/elb_classic_lb.py +++ b/plugins/modules/elb_classic_lb.py @@ -360,13 +360,13 @@ - amazon.aws.elb_classic_lb: name: "test-please-delete" state: absent - wait: yes + wait: true # Ensure ELB is gone and wait for check with timeout value - amazon.aws.elb_classic_lb: name: "test-please-delete" state: absent - wait: yes + wait: true wait_timeout: 600 # Normally, this module will purge any listeners that exist on the ELB @@ -382,7 +382,7 @@ - protocol: http load_balancer_port: 80 instance_port: 80 - purge_listeners: no + purge_listeners: false # Normally, this module will leave availability zones that are enabled # on the ELB alone. If purge_zones is true, then any extraneous zones @@ -397,7 +397,7 @@ - protocol: http load_balancer_port: 80 instance_port: 80 - purge_zones: yes + purge_zones: true # Creates a ELB and assigns a list of subnets to it. - amazon.aws.elb_classic_lb: @@ -405,7 +405,7 @@ name: 'New ELB' security_group_ids: 'sg-123456, sg-67890' subnets: 'subnet-123456,subnet-67890' - purge_subnets: yes + purge_subnets: true listeners: - protocol: http load_balancer_port: 80 @@ -440,7 +440,7 @@ instance_port: 80 stickiness: type: loadbalancer - enabled: yes + enabled: true expiration: 300 # Create an ELB with application stickiness enabled @@ -456,7 +456,7 @@ instance_port: 80 stickiness: type: application - enabled: yes + enabled: true cookie: SESSIONID # Create an ELB and add tags diff --git a/plugins/modules/s3_bucket.py b/plugins/modules/s3_bucket.py index 27abe82aaf0..320a7cc535a 100644 --- a/plugins/modules/s3_bucket.py +++ b/plugins/modules/s3_bucket.py @@ -35,7 +35,7 @@ - When trying to delete a bucket, delete all keys (including versions and delete markers) in the bucket first (an S3 bucket must be empty for a successful deletion). type: bool - default: 'no' + default: false name: description: - Name of the S3 bucket. @@ -192,14 +192,14 @@ - amazon.aws.s3_bucket: name: mys3bucket state: absent - force: yes + force: true # Create a bucket, add a policy from a file, enable requester pays, enable versioning and tag - amazon.aws.s3_bucket: name: mys3bucket policy: "{{ lookup('file','policy.json') }}" - requester_pays: yes - versioning: yes + requester_pays: true + versioning: true tags: example: tag1 another: tag2 diff --git a/plugins/modules/s3_object.py b/plugins/modules/s3_object.py index 9cf270dfd25..f18220f23b8 100644 --- a/plugins/modules/s3_object.py +++ b/plugins/modules/s3_object.py @@ -965,7 +965,7 @@ def main(): overwrite=dict(aliases=['force'], default='different'), prefix=dict(default=""), retries=dict(aliases=['retry'], type='int', default=0), - dualstack=dict(default='no', type='bool'), + dualstack=dict(default=False, type='bool'), ceph=dict(default=False, type='bool', aliases=['rgw']), src=dict(type='path'), content=dict(),