Skip to content

Commit

Permalink
adjust booleans (#1420)
Browse files Browse the repository at this point in the history
adjust booleans: use true/false

Depends-On: #1423
SUMMARY
ansible-community/community-topics#116
ISSUE TYPE


Docs Pull Request

Reviewed-by: Mark Chappell <None>
Reviewed-by: Alina Buzachis <None>
  • Loading branch information
markuman committed Aug 26, 2022
1 parent e9a9247 commit cb9716e
Show file tree
Hide file tree
Showing 40 changed files with 130 additions and 130 deletions.
22 changes: 11 additions & 11 deletions plugins/modules/application_autoscaling_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@
options:
state:
description: Whether a policy should be C(present) or C(absent).
required: yes
required: true
choices: ['absent', 'present']
type: str
policy_name:
description: The name of the scaling policy.
required: yes
required: true
type: str
service_namespace:
description: The namespace of the AWS service.
required: yes
required: true
choices: ['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb']
type: str
resource_id:
description: The identifier of the resource associated with the scalable target.
required: yes
required: true
type: str
scalable_dimension:
description: The scalable dimension associated with the scalable target.
required: yes
required: true
choices: [ 'ecs:service:DesiredCount',
'ec2:spot-fleet-request:TargetCapacity',
'elasticmapreduce:instancegroup:InstanceCount',
Expand All @@ -54,19 +54,19 @@
type: str
policy_type:
description: The policy type.
required: yes
required: true
choices: ['StepScaling', 'TargetTrackingScaling']
type: str
step_scaling_policy_configuration:
description: A step scaling policy. This parameter is required if you are creating a policy and I(policy_type=StepScaling).
required: no
required: false
type: dict
target_tracking_scaling_policy_configuration:
description:
- A target tracking policy. This parameter is required if you are creating a new policy and I(policy_type=TargetTrackingScaling).
- 'Full documentation of the suboptions can be found in the API documentation:'
- 'U(https://docs.aws.amazon.com/autoscaling/application/APIReference/API_TargetTrackingScalingPolicyConfiguration.html)'
required: no
required: false
type: dict
suboptions:
CustomizedMetricSpecification:
Expand All @@ -90,18 +90,18 @@
minimum_tasks:
description: The minimum value to scale to in response to a scale in event.
This parameter is required if you are creating a first new policy for the specified service.
required: no
required: false
type: int
maximum_tasks:
description: The maximum value to scale to in response to a scale out event.
This parameter is required if you are creating a first new policy for the specified service.
required: no
required: false
type: int
override_task_capacity:
description:
- Whether or not to override values of minimum and/or maximum tasks if it's already set.
- Defaults to C(false).
required: no
required: false
type: bool
extends_documentation_fragment:
- amazon.aws.aws
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/autoscaling_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
vpc_zone_identifier: [ 'subnet-abcd1234', 'subnet-1a2b3c4d' ]
tags:
- environment: production
propagate_at_launch: no
propagate_at_launch: false
# Rolling ASG Updates
Expand All @@ -361,14 +361,14 @@
region: us-east-1
security_groups: sg-23423
instance_type: m1.small
assign_public_ip: yes
assign_public_ip: true
- community.aws.autoscaling_group:
name: myasg
launch_config_name: my_new_lc
health_check_period: 60
health_check_type: ELB
replace_all_instances: yes
replace_all_instances: true
min_size: 5
max_size: 5
desired_capacity: 5
Expand Down Expand Up @@ -406,7 +406,7 @@
vpc_zone_identifier: [ 'subnet-abcd1234', 'subnet-1a2b3c4d' ]
tags:
- environment: production
propagate_at_launch: no
propagate_at_launch: false
# Basic Configuration with Launch Template using mixed instance policy
Expand All @@ -432,7 +432,7 @@
vpc_zone_identifier: [ 'subnet-abcd1234', 'subnet-1a2b3c4d' ]
tags:
- environment: production
propagate_at_launch: no
propagate_at_launch: false
'''

RETURN = r'''
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/autoscaling_launch_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@
snapshot: snap-XXXX
volume_type: gp2
delete_on_termination: true
encrypted: no
encrypted: false
- name: Create launch configuration
community.aws.autoscaling_launch_config:
name: lc1
image_id: ami-xxxx
assign_public_ip: yes
assign_public_ip: true
instance_type: t2.medium
key_name: my-key
security_groups: "['sg-xxxx']"
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/cloudformation_stack_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def update_stack_set(module, stack_params, cfn):
except is_boto3_error_code('OperationInProgressException') as err: # pylint: disable=duplicate-except
module.fail_json_aws(
err, msg="Another operation is already in progress on this stack set - please try again later. When making "
"multiple cloudformation_stack_set calls, it's best to enable `wait: yes` to avoid unfinished op errors.")
"multiple cloudformation_stack_set calls, it's best to enable `wait: true` to avoid unfinished op errors.")
except (ClientError, BotoCoreError) as err: # pylint: disable=duplicate-except
module.fail_json_aws(err, msg="Could not update stack set.")
if module.params.get('wait'):
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/cloudfront_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
purge_aliases:
description:
- Specifies whether existing aliases will be removed before adding new aliases.
- When I(purge_aliases=yes), existing aliases are removed and I(aliases) are added.
- When I(purge_aliases=true), existing aliases are removed and I(aliases) are added.
default: false
type: bool
Expand Down Expand Up @@ -624,7 +624,7 @@
- tested.com
tags:
Project: distribution 1.2
purge_tags: yes
purge_tags: true
- name: create a distribution with an origin, logging and default cache behavior
community.aws.cloudfront_distribution:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/config_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
- 1234567890
- 0123456789
- 9012345678
all_aws_regions: yes
all_aws_regions: true
'''

RETURN = r'''#'''
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/ec2_ami_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
description:
- Wait for the copied AMI to be in state C(available) before returning.
type: bool
default: 'no'
default: false
wait_timeout:
description:
- How long before wait gives up, in seconds.
Expand Down Expand Up @@ -87,7 +87,7 @@
source_region: us-east-1
region: eu-west-1
source_image_id: ami-xxxxxxx
wait: yes
wait: true
wait_timeout: 1200 # Default timeout is 600
register: image_id
Expand All @@ -107,21 +107,21 @@
tags:
Name: My-Super-AMI
Patch: 1.2.3
tag_equality: yes
tag_equality: true
- name: Encrypted AMI copy
community.aws.ec2_ami_copy:
source_region: us-east-1
region: eu-west-1
source_image_id: ami-xxxxxxx
encrypted: yes
encrypted: true
- name: Encrypted AMI copy with specified key
community.aws.ec2_ami_copy:
source_region: us-east-1
region: eu-west-1
source_image_id: ami-xxxxxxx
encrypted: yes
encrypted: true
kms_key_id: arn:aws:kms:us-east-1:XXXXXXXXXXXX:key/746de6ea-50a4-4bcb-8fbc-e3b29f2d367b
'''

Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/ec2_snapshot_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
description:
- Whether or not the destination Snapshot should be encrypted.
type: bool
default: 'no'
default: false
kms_key_id:
description:
- KMS key id used to encrypt snapshot. If not specified, AWS defaults to C(alias/aws/ebs).
Expand All @@ -42,7 +42,7 @@
description:
- Wait for the copied Snapshot to be in the C(Available) state before returning.
type: bool
default: 'no'
default: false
wait_timeout:
description:
- How long before wait gives up, in seconds.
Expand Down Expand Up @@ -72,7 +72,7 @@
source_region: eu-central-1
region: eu-west-1
source_snapshot_id: snap-xxxxxxx
wait: yes
wait: true
wait_timeout: 1200 # Default timeout is 600
register: snapshot_id
Expand All @@ -89,14 +89,14 @@
source_region: eu-central-1
region: eu-west-1
source_snapshot_id: snap-xxxxxxx
encrypted: yes
encrypted: true
- name: Encrypted Snapshot copy with specified key
community.aws.ec2_snapshot_copy:
source_region: eu-central-1
region: eu-west-1
source_snapshot_id: snap-xxxxxxx
encrypted: yes
encrypted: true
kms_key_id: arn:aws:kms:eu-central-1:XXXXXXXXXXXX:key/746de6ea-50a4-4bcb-8fbc-e3b29f2d367b
'''

Expand Down
18 changes: 9 additions & 9 deletions plugins/modules/ec2_transit_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
- name: Create a new transit gateway with options
community.aws.ec2_transit_gateway:
asn: 64514
auto_associate: no
auto_propagate: no
auto_associate: false
auto_propagate: false
dns_support: True
description: "nonprod transit gateway"
purge_tags: False
Expand Down Expand Up @@ -470,17 +470,17 @@ def setup_module_object():

argument_spec = dict(
asn=dict(type='int'),
auto_associate=dict(type='bool', default='yes'),
auto_attach=dict(type='bool', default='no'),
auto_propagate=dict(type='bool', default='yes'),
auto_associate=dict(type='bool', default=True),
auto_attach=dict(type='bool', default=False),
auto_propagate=dict(type='bool', default=True),
description=dict(type='str'),
dns_support=dict(type='bool', default='yes'),
purge_tags=dict(type='bool', default='yes'),
dns_support=dict(type='bool', default=True),
purge_tags=dict(type='bool', default=True),
state=dict(default='present', choices=['present', 'absent']),
tags=dict(type='dict', aliases=['resource_tags']),
transit_gateway_id=dict(type='str'),
vpn_ecmp_support=dict(type='bool', default='yes'),
wait=dict(type='bool', default='yes'),
vpn_ecmp_support=dict(type='bool', default=True),
wait=dict(type='bool', default=True),
wait_timeout=dict(type='int', default=300)
)

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/ec2_vpc_vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- The desired state of the VPN connection.
choices: ['present', 'absent']
default: present
required: no
required: false
type: str
customer_gateway_id:
description:
Expand All @@ -51,13 +51,13 @@
- Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
default: False
type: bool
required: no
required: false
tunnel_options:
description:
- An optional list object containing no more than two dict members, each of which may contain I(TunnelInsideCidr)
and/or I(PreSharedKey) keys with appropriate string values. AWS defaults will apply in absence of either of
the aforementioned keys.
required: no
required: false
type: list
elements: dict
suboptions:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ec2_win_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
instance_id: i-XXXXXX
region: us-east-1
key_file: "~/aws-creds/my_test_key.pem"
wait: yes
wait: true
wait_timeout: 45
'''

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/ecs_ecr.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
type: bool
purge_policy:
description:
- If yes, remove the policy from the repository.
- If C(true), remove the policy from the repository.
- Defaults to C(false).
required: false
type: bool
Expand Down Expand Up @@ -133,7 +133,7 @@
- name: delete-policy
community.aws.ecs_ecr:
name: needs-no-policy
purge_policy: yes
purge_policy: true
- name: create immutable ecr-repo
community.aws.ecs_ecr:
Expand All @@ -143,7 +143,7 @@
- name: set-lifecycle-policy
community.aws.ecs_ecr:
name: needs-lifecycle-policy
scan_on_push: yes
scan_on_push: true
lifecycle_policy:
rules:
- rulePriority: 1
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ecs_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
started_by: ansible_user
launch_type: FARGATE
network_configuration:
assign_public_ip: yes
assign_public_ip: true
subnets:
- subnet-abcd1234
register: task_output
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/eks_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
- name: Remove an EKS cluster
community.aws.eks_cluster:
name: my_cluster
wait: yes
wait: true
state: absent
'''

Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/eks_fargate_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@
labels:
- label1: test
state: present
wait: yes
wait: true
- name: Remove an EKS Fargate Profile
community.aws.eks_fargate_profile:
name: test_fargate
cluster_name: test_cluster
wait: yes
wait: true
state: absent
'''

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/elasticache_parameter_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
name:
description:
- A user-specified name for the cache parameter group.
required: yes
required: true
type: str
description:
description:
Expand Down
Loading

0 comments on commit cb9716e

Please sign in to comment.