From 9b732df436fe414bd78bf49fb349af0b9ec662ce Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Tue, 27 Nov 2018 20:41:01 +0530 Subject: [PATCH] E325 removal - Part I (#49136) Remove E325 from Amazon modules Signed-off-by: Abhijeet Kasurde --- ...s_direct_connect_link_aggregation_group.py | 2 + .../cloud/amazon/aws_elasticbeanstalk_app.py | 1 + .../modules/cloud/amazon/aws_kms_facts.py | 1 + lib/ansible/modules/cloud/amazon/aws_s3.py | 3 ++ .../cloud/amazon/aws_ssm_parameter_store.py | 4 +- .../modules/cloud/amazon/aws_waf_condition.py | 5 +- .../modules/cloud/amazon/aws_waf_rule.py | 3 +- .../modules/cloud/amazon/aws_waf_web_acl.py | 5 +- .../modules/cloud/amazon/cloudformation.py | 1 + .../cloud/amazon/cloudformation_facts.py | 5 ++ .../cloud/amazon/cloudfront_distribution.py | 6 +-- .../modules/cloud/amazon/cloudfront_facts.py | 14 ++++++ .../modules/cloud/amazon/cloudtrail.py | 4 ++ .../cloud/amazon/cloudwatchlogs_log_group.py | 1 + lib/ansible/modules/cloud/amazon/ec2.py | 5 +- lib/ansible/modules/cloud/amazon/ec2_ami.py | 4 +- .../modules/cloud/amazon/ec2_ami_copy.py | 2 + lib/ansible/modules/cloud/amazon/ec2_asg.py | 4 ++ lib/ansible/modules/cloud/amazon/ec2_eip.py | 4 ++ .../modules/cloud/amazon/ec2_elb_lb.py | 1 + lib/ansible/modules/cloud/amazon/ec2_group.py | 2 + .../modules/cloud/amazon/ec2_instance.py | 5 ++ lib/ansible/modules/cloud/amazon/ec2_key.py | 2 + lib/ansible/modules/cloud/amazon/ec2_vol.py | 1 + .../cloud/amazon/ec2_vpc_nat_gateway.py | 3 ++ .../modules/cloud/amazon/ec2_vpc_net.py | 1 + .../cloud/amazon/ec2_vpc_route_table.py | 1 + .../modules/cloud/amazon/ec2_vpc_vgw.py | 1 + .../modules/cloud/amazon/ec2_vpc_vpn.py | 2 + lib/ansible/modules/cloud/amazon/ecs_ecr.py | 2 + .../cloud/amazon/ecs_taskdefinition.py | 1 + .../modules/cloud/amazon/elb_target_group.py | 1 + lib/ansible/modules/cloud/amazon/iam_cert.py | 2 +- lib/ansible/modules/cloud/amazon/iam_group.py | 6 ++- lib/ansible/modules/cloud/amazon/iam_user.py | 1 + .../modules/cloud/amazon/kinesis_stream.py | 1 + .../modules/cloud/amazon/rds_param_group.py | 5 +- lib/ansible/modules/cloud/amazon/route53.py | 1 + lib/ansible/modules/cloud/amazon/s3_bucket.py | 1 + lib/ansible/modules/cloud/amazon/s3_sync.py | 1 + lib/ansible/modules/cloud/amazon/sns_topic.py | 1 + .../cloud/cloudscale/cloudscale_server.py | 3 ++ test/sanity/validate-modules/ignore.txt | 46 ------------------- 43 files changed, 104 insertions(+), 61 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py b/lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py index 2d4b9755e26..a7cc74de8bd 100644 --- a/lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py +++ b/lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py @@ -50,12 +50,14 @@ options: description: - This allows the minimum number of links to be set to 0, any hosted connections disassociated, and any virtual interfaces associated to the LAG deleted. + type: bool connection_id: description: - A connection ID to link with the link aggregation group upon creation. delete_with_disassociation: description: - To be used with I(state=absent) to delete connections after disassociating them with the LAG. + type: bool wait: description: - Whether or not to wait for the operation to complete. May be useful when waiting for virtual interfaces diff --git a/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py b/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py index e8bc3e3cff7..c20ab0b7a94 100644 --- a/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py +++ b/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py @@ -35,6 +35,7 @@ options: description: - when set to true, running environments will be terminated before deleting the application default: false + type: bool author: - Harpreet Singh (@hsingh) - Stephen Granger (@viper233) diff --git a/lib/ansible/modules/cloud/amazon/aws_kms_facts.py b/lib/ansible/modules/cloud/amazon/aws_kms_facts.py index 362b1c3d8cc..14e19e11805 100644 --- a/lib/ansible/modules/cloud/amazon/aws_kms_facts.py +++ b/lib/ansible/modules/cloud/amazon/aws_kms_facts.py @@ -36,6 +36,7 @@ options: pending_deletion: description: Whether to get full details (tags, grants etc.) of keys pending deletion default: False + type: bool extends_documentation_fragment: - aws - ec2 diff --git a/lib/ansible/modules/cloud/amazon/aws_s3.py b/lib/ansible/modules/cloud/amazon/aws_s3.py index fd43fd32389..00ef2581250 100644 --- a/lib/ansible/modules/cloud/amazon/aws_s3.py +++ b/lib/ansible/modules/cloud/amazon/aws_s3.py @@ -52,6 +52,7 @@ options: - When set for PUT mode, asks for server-side encryption. default: True version_added: "2.0" + type: bool encryption_mode: description: - What encryption mode to use if C(encrypt) is set @@ -145,6 +146,7 @@ options: - Enable Ceph RGW S3 support. This option requires an explicit url via s3_url. default: false version_added: "2.2" + type: bool src: description: - The source file path when performing a PUT operation. @@ -155,6 +157,7 @@ options: GetObject permission but no other permissions. In this case using the option mode: get will fail without specifying ignore_nonexistent_bucket: True." version_added: "2.3" + type: bool encryption_kms_key_id: description: - KMS key id to use when encrypting objects using C(aws:kms) encryption. Ignored if encryption is not C(aws:kms) diff --git a/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py b/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py index e2964115e92..1b4ad2e8cf9 100644 --- a/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py +++ b/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py @@ -20,7 +20,7 @@ options: required: true description: description: - - parameter key desciption. + - parameter key description. required: false value: description: @@ -42,7 +42,7 @@ options: decryption: description: - Work with SecureString type to get plain text secrets - - Boolean + type: bool required: false default: True key_id: diff --git a/lib/ansible/modules/cloud/amazon/aws_waf_condition.py b/lib/ansible/modules/cloud/amazon/aws_waf_condition.py index e2fb59511b8..b30e48fd5d1 100644 --- a/lib/ansible/modules/cloud/amazon/aws_waf_condition.py +++ b/lib/ansible/modules/cloud/amazon/aws_waf_condition.py @@ -53,7 +53,10 @@ options: - I(target_string) is a maximum of 50 bytes. - I(regex_pattern) is a dict with a C(name) key and C(regex_strings) list of strings to match. purge_filters: - description: Whether to remove existing filters from a condition if not passed in I(filters). Defaults to false. + description: + - Whether to remove existing filters from a condition if not passed in I(filters). + default: False + type: bool state: description: Whether the condition should be C(present) or C(absent). choices: diff --git a/lib/ansible/modules/cloud/amazon/aws_waf_rule.py b/lib/ansible/modules/cloud/amazon/aws_waf_rule.py index 5c0b6785f2a..d41760c227a 100644 --- a/lib/ansible/modules/cloud/amazon/aws_waf_rule.py +++ b/lib/ansible/modules/cloud/amazon/aws_waf_rule.py @@ -47,7 +47,8 @@ options: purge_conditions: description: - Whether or not to remove conditions that are not passed when updating `conditions`. - Defaults to false. + default: False + type: bool ''' EXAMPLES = ''' diff --git a/lib/ansible/modules/cloud/amazon/aws_waf_web_acl.py b/lib/ansible/modules/cloud/amazon/aws_waf_web_acl.py index 0fb20075643..1c4ce5e0456 100644 --- a/lib/ansible/modules/cloud/amazon/aws_waf_web_acl.py +++ b/lib/ansible/modules/cloud/amazon/aws_waf_web_acl.py @@ -51,7 +51,10 @@ options: - The I(type) key can be passed as C(rate_based), it defaults to C(regular) purge_rules: - description: Whether to remove rules that aren't passed with C(rules). Defaults to false + description: + - Whether to remove rules that aren't passed with C(rules). + default: False + type: bool ''' EXAMPLES = ''' diff --git a/lib/ansible/modules/cloud/amazon/cloudformation.py b/lib/ansible/modules/cloud/amazon/cloudformation.py index a26317b02b2..39988bc1e23 100644 --- a/lib/ansible/modules/cloud/amazon/cloudformation.py +++ b/lib/ansible/modules/cloud/amazon/cloudformation.py @@ -105,6 +105,7 @@ options: termination_protection: description: - enable or disable termination protection on the stack. Only works with botocore >= 1.7.18. + type: bool version_added: "2.5" template_body: description: diff --git a/lib/ansible/modules/cloud/amazon/cloudformation_facts.py b/lib/ansible/modules/cloud/amazon/cloudformation_facts.py index 106d67c4d25..a75fa9e6394 100644 --- a/lib/ansible/modules/cloud/amazon/cloudformation_facts.py +++ b/lib/ansible/modules/cloud/amazon/cloudformation_facts.py @@ -29,22 +29,27 @@ options: all_facts: description: - Get all stack information for the stack + type: bool default: 'no' stack_events: description: - Get stack events for the stack + type: bool default: 'no' stack_template: description: - Get stack template body for the stack + type: bool default: 'no' stack_resources: description: - Get stack resources for the stack + type: bool default: 'no' stack_policy: description: - Get stack policy for the stack + type: bool default: 'no' extends_documentation_fragment: - aws diff --git a/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py b/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py index 33b80bf3c70..d871c77dbdf 100644 --- a/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py +++ b/lib/ansible/modules/cloud/amazon/cloudfront_distribution.py @@ -123,7 +123,7 @@ options: purge_origins: description: Whether to remove any origins that aren't listed in I(origins) default: false - + type: bool default_cache_behavior: description: - A config element that is a complex object specifying the default cache behavior of the distribution. If not specified, the I(target_origin_id) is @@ -187,7 +187,7 @@ options: description: Whether to remove any cache behaviors that aren't listed in I(cache_behaviors). This switch also allows the reordering of cache_behaviors. default: false - + type: bool custom_error_responses: description: - A config element that is a I(list[]) of complex custom error responses to be specified for the distribution. This attribute configures custom http @@ -201,7 +201,7 @@ options: purge_custom_error_responses: description: Whether to remove any custom error responses that aren't listed in I(custom_error_responses) default: false - + type: bool comment: description: - A comment that describes the cloudfront distribution. If not specified, it defaults to a diff --git a/lib/ansible/modules/cloud/amazon/cloudfront_facts.py b/lib/ansible/modules/cloud/amazon/cloudfront_facts.py index 3ed6ea11cfd..10896667e1a 100644 --- a/lib/ansible/modules/cloud/amazon/cloudfront_facts.py +++ b/lib/ansible/modules/cloud/amazon/cloudfront_facts.py @@ -58,78 +58,92 @@ options: - Get all cloudfront lists that do not require parameters. required: false default: false + type: bool origin_access_identity: description: - Get information about an origin access identity. Requires I(origin_access_identity_id) to be specified. required: false default: false + type: bool origin_access_identity_config: description: - Get the configuration information about an origin access identity. Requires I(origin_access_identity_id) to be specified. required: false default: false + type: bool distribution: description: - Get information about a distribution. Requires I(distribution_id) or I(domain_name_alias) to be specified. required: false default: false + type: bool distribution_config: description: - Get the configuration information about a distribution. Requires I(distribution_id) or I(domain_name_alias) to be specified. required: false default: false + type: bool invalidation: description: - Get information about an invalidation. Requires I(invalidation_id) to be specified. required: false default: false + type: bool streaming_distribution: description: - Get information about a specified RTMP distribution. Requires I(distribution_id) or I(domain_name_alias) to be specified. required: false default: false + type: bool streaming_distribution_config: description: - Get the configuration information about a specified RTMP distribution. Requires I(distribution_id) or I(domain_name_alias) to be specified. required: false default: false + type: bool list_origin_access_identities: description: - Get a list of cloudfront origin access identities. Requires I(origin_access_identity_id) to be set. required: false default: false + type: bool list_distributions: description: - Get a list of cloudfront distributions. required: false default: false + type: bool list_distributions_by_web_acl_id: description: - Get a list of distributions using web acl id as a filter. Requires I(web_acl_id) to be set. required: false default: false + type: bool list_invalidations: description: - Get a list of invalidations. Requires I(distribution_id) or I(domain_name_alias) to be specified. required: false default: false + type: bool list_streaming_distributions: description: - Get a list of streaming distributions. required: false default: false + type: bool summary: description: - Returns a summary of all distributions, streaming distributions and origin_access_identities. This is the default behaviour if no option is selected. required: false default: false + type: bool extends_documentation_fragment: - aws diff --git a/lib/ansible/modules/cloud/amazon/cloudtrail.py b/lib/ansible/modules/cloud/amazon/cloudtrail.py index 6a0d3ab6800..c3349cabf15 100644 --- a/lib/ansible/modules/cloud/amazon/cloudtrail.py +++ b/lib/ansible/modules/cloud/amazon/cloudtrail.py @@ -42,6 +42,7 @@ options: description: - Start or stop the CloudTrail logging. If stopped the trail will be paused and will not record events or deliver log files. default: true + type: bool version_added: "2.4" s3_bucket_name: description: @@ -57,17 +58,20 @@ options: description: - Specify whether the trail belongs only to one region or exists in all regions. default: false + type: bool version_added: "2.4" enable_log_file_validation: description: - Specifies whether log file integrity validation is enabled. - CloudTrail will create a hash for every log file delivered and produce a signed digest file that can be used to ensure log files have not been tampered. version_added: "2.4" + type: bool aliases: [ "log_file_validation_enabled" ] include_global_events: description: - Record API calls from global services such as IAM and STS. default: true + type: bool aliases: [ "include_global_service_events" ] sns_topic_name: description: diff --git a/lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group.py b/lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group.py index a94041ed8cf..eccfc796598 100644 --- a/lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group.py +++ b/lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group.py @@ -52,6 +52,7 @@ options: - Whether an existing log group should be overwritten on create. default: false required: false + type: bool extends_documentation_fragment: - aws - ec2 diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index 5c87d18f64d..19f5a6c638a 100644 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -186,6 +186,7 @@ options: description: - whether instance is using optimized EBS volumes, see U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html). default: 'no' + type: bool exact_count: version_added: "1.5" description: @@ -1598,12 +1599,12 @@ def main(): source_dest_check=dict(type='bool', default=None), termination_protection=dict(type='bool', default=None), state=dict(default='present', choices=['present', 'absent', 'running', 'restarted', 'stopped']), - instance_initiated_shutdown_behavior=dict(default=None, choices=['stop', 'terminate']), + instance_initiated_shutdown_behavior=dict(default='stop', choices=['stop', 'terminate']), exact_count=dict(type='int', default=None), count_tag=dict(), volumes=dict(type='list'), ebs_optimized=dict(type='bool', default=False), - tenancy=dict(default='default'), + tenancy=dict(default='default', choices=['default', 'dedicated']), network_interfaces=dict(type='list', aliases=['network_interface']) ) ) diff --git a/lib/ansible/modules/cloud/amazon/ec2_ami.py b/lib/ansible/modules/cloud/amazon/ec2_ami.py index c88a2231de4..918e8a1b281 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_ami.py +++ b/lib/ansible/modules/cloud/amazon/ec2_ami.py @@ -86,6 +86,7 @@ options: description: Whether to remove existing tags that aren't passed in the C(tags) parameter version_added: "2.5" default: "no" + type: bool launch_permissions: description: - Users and groups that should be able to launch the AMI. Expects dictionary with a key of user_ids and/or group_names. user_ids should @@ -100,6 +101,7 @@ options: description: - A boolean representing whether enhanced networking with ENA is enabled or not. version_added: "2.5" + type: bool billing_products: description: - A list of valid billing codes. To be used with valid accounts by aws marketplace vendors. @@ -654,7 +656,7 @@ def main(): wait_timeout=dict(default=900, type='int'), description=dict(default=''), no_reboot=dict(default=False, type='bool'), - state=dict(default='present'), + state=dict(default='present', choices=['present', 'absent']), device_mapping=dict(type='list'), tags=dict(type='dict'), launch_permissions=dict(type='dict'), diff --git a/lib/ansible/modules/cloud/amazon/ec2_ami_copy.py b/lib/ansible/modules/cloud/amazon/ec2_ami_copy.py index 9f28dddf3ca..e7268ea07e5 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_ami_copy.py +++ b/lib/ansible/modules/cloud/amazon/ec2_ami_copy.py @@ -47,6 +47,7 @@ options: description: - Whether or not the destination snapshots of the copied AMI should be encrypted. version_added: "2.2" + type: bool kms_key_id: description: - KMS key id used to encrypt image. If not specified, uses default EBS Customer Master Key (CMK) for your account. @@ -70,6 +71,7 @@ options: - Whether to use tags if the source AMI already exists in the target region. If this is set, and all tags match in an existing AMI, the AMI will not be copied again. default: false + type: bool version_added: 2.6 author: - Amir Moulavi (@amir343) diff --git a/lib/ansible/modules/cloud/amazon/ec2_asg.py b/lib/ansible/modules/cloud/amazon/ec2_asg.py index 8a19743a381..7b88a717d39 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_asg.py +++ b/lib/ansible/modules/cloud/amazon/ec2_asg.py @@ -88,6 +88,7 @@ options: Once that's done the ASG size is reduced back to the expected size. version_added: "1.8" default: 'no' + type: bool replace_batch_size: description: - Number of instances you'd like to replace at a time. Used with replace_all_instances. @@ -104,11 +105,13 @@ options: - Check to make sure instances that are being replaced with replace_instances do not already have the current launch_config. version_added: "1.8" default: 'yes' + type: bool lt_check: description: - Check to make sure instances that are being replaced with replace_instances do not already have the current launch_template or launch_template version. version_added: "2.8" default: 'yes' + type: bool vpc_zone_identifier: description: - List of VPC subnets to use @@ -146,6 +149,7 @@ options: instances have a lifecycle_state of "InService" and a health_status of "Healthy". version_added: "1.9" default: 'yes' + type: bool termination_policies: description: - An ordered list of criteria used for selecting instances to be removed from the Auto Scaling group when reducing capacity. diff --git a/lib/ansible/modules/cloud/amazon/ec2_eip.py b/lib/ansible/modules/cloud/amazon/ec2_eip.py index f6f220a7215..07cf3b6ecb2 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eip.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eip.py @@ -42,16 +42,19 @@ options: description: - Allocate an EIP inside a VPC or not. Required if specifying an ENI. default: 'no' + type: bool version_added: "1.4" reuse_existing_ip_allowed: description: - Reuse an EIP that is not associated to a device (when available), instead of allocating a new one. default: 'no' + type: bool version_added: "1.6" release_on_disassociation: description: - whether or not to automatically release the EIP when it is disassociated default: 'no' + type: bool version_added: "2.0" private_ip_address: description: @@ -62,6 +65,7 @@ options: - Specify this option to allow an Elastic IP address that is already associated with another network interface or instance to be re-associated with the specified instance or interface. default: 'no' + type: bool version_added: "2.5" extends_documentation_fragment: - aws diff --git a/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py b/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py index ed4798b0391..dd1664514f0 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py +++ b/lib/ansible/modules/cloud/amazon/ec2_elb_lb.py @@ -85,6 +85,7 @@ options: - Purge existing subnet on ELB that are not found in subnets default: 'no' version_added: "1.7" + type: bool scheme: description: - The scheme to use when creating the ELB. For a private VPC-visible ELB use 'internal'. diff --git a/lib/ansible/modules/cloud/amazon/ec2_group.py b/lib/ansible/modules/cloud/amazon/ec2_group.py index 2bd0bf65b99..27ba2bb75d6 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_group.py +++ b/lib/ansible/modules/cloud/amazon/ec2_group.py @@ -81,6 +81,7 @@ options: required: false default: 'true' aliases: [] + type: bool purge_rules_egress: version_added: "1.8" description: @@ -88,6 +89,7 @@ options: required: false default: 'true' aliases: [] + type: bool tags: version_added: "2.4" description: diff --git a/lib/ansible/modules/cloud/amazon/ec2_instance.py b/lib/ansible/modules/cloud/amazon/ec2_instance.py index 1440c176349..43f1c1aef07 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_instance.py +++ b/lib/ansible/modules/cloud/amazon/ec2_instance.py @@ -33,6 +33,7 @@ options: description: - Whether or not to wait for the desired state (use wait_timeout to customize this). default: true + type: bool wait_timeout: description: - How long to wait (in seconds) for the instance to finish booting/terminating. @@ -69,6 +70,7 @@ options: - Delete any tags not specified in the task that are on the instance. This means you have to specify all the desired tags on each task affecting an instance. default: false + type: bool image: description: - An image to use for the instance. The ec2_ami_facts module may be used to retrieve images. @@ -136,6 +138,7 @@ options: description: - Whether to enable termination protection. This module will not terminate an instance with termination protection active, it must be turned off first. + type: bool cpu_credit_specification: description: - For T2 series instances, choose whether to allow increased charges to buy CPU credits if the default pool is depleted. @@ -161,9 +164,11 @@ options: detailed_monitoring: description: - Whether to allow detailed cloudwatch metrics to be collected, enabling more detailed alerting. + type: bool ebs_optimized: description: - Whether instance is should use optimized EBS volumes, see U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html). + type: bool filters: description: - A dict of filters to apply when deciding whether existing instances match and should be altered. Each dict item diff --git a/lib/ansible/modules/cloud/amazon/ec2_key.py b/lib/ansible/modules/cloud/amazon/ec2_key.py index ebcba6621f9..d493757f74b 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_key.py +++ b/lib/ansible/modules/cloud/amazon/ec2_key.py @@ -33,6 +33,7 @@ options: - Force overwrite of already existing key pair if key has changed. required: false default: true + type: bool version_added: "2.3" state: description: @@ -45,6 +46,7 @@ options: - Wait for the specified action to complete before returning. This option has no effect since version 2.5. required: false default: false + type: bool version_added: "1.6" wait_timeout: description: diff --git a/lib/ansible/modules/cloud/amazon/ec2_vol.py b/lib/ansible/modules/cloud/amazon/ec2_vol.py index 13c25f6cdc1..b34bde3761a 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vol.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vol.py @@ -50,6 +50,7 @@ options: description: - Enable encryption at rest for this volume. default: 'no' + type: bool version_added: "1.8" kms_key_id: description: diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py index c6a56f3416d..546a2268264 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py @@ -47,16 +47,19 @@ options: - if a NAT Gateway exists already in the subnet_id, then do not create a new one. required: false default: false + type: bool release_eip: description: - Deallocate the EIP from the VPC. - Option is only valid with the absent state. - You should use this with the wait option. Since you can not release an address while a delete operation is happening. default: 'yes' + type: bool wait: description: - Wait for operation to complete before returning. default: 'no' + type: bool wait_timeout: description: - How many seconds to wait for an operation to complete before timing out. diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py index 15e7b52db82..07619078f8c 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py @@ -69,6 +69,7 @@ options: description: - By default the module will not create another VPC if there is another VPC with the same name and CIDR block. Specify this as true if you want duplicate VPCs created. + type: bool default: false requirements: - boto3 diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py index 07962e6033e..cb2a387f333 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py @@ -47,6 +47,7 @@ options: version_added: "2.3" description: Purge existing subnets that are not found in subnets. Ignored unless the subnets option is supplied. default: 'true' + type: bool purge_tags: version_added: "2.5" description: Purge existing tags that are not found in route table diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py index 33e917168d9..4941b3a5646 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py @@ -56,6 +56,7 @@ options: author: Nick Aslanidis (@naslanidis) extends_documentation_fragment: - ec2 + - aws ''' EXAMPLES = ''' diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py index eb6c51bd183..996f72e0749 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py @@ -53,6 +53,7 @@ options: description: - 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 tunnel_options: description: @@ -108,6 +109,7 @@ options: purge_routes: description: - Whether or not to delete VPN connections routes that are not specified in the task. + type: bool """ EXAMPLES = """ diff --git a/lib/ansible/modules/cloud/amazon/ecs_ecr.py b/lib/ansible/modules/cloud/amazon/ecs_ecr.py index 06c4fde843d..ca03309f614 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_ecr.py +++ b/lib/ansible/modules/cloud/amazon/ecs_ecr.py @@ -39,11 +39,13 @@ options: setting another policy in the future. required: false default: false + type: bool delete_policy: description: - if yes, remove the policy from the repository required: false default: false + type: bool state: description: - create or destroy the repository diff --git a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py index 495f06e9bcb..bffaaa8192c 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py +++ b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py @@ -51,6 +51,7 @@ options: - Always create new task definition required: False version_added: 2.5 + type: bool containers: description: - A list of containers definitions diff --git a/lib/ansible/modules/cloud/amazon/elb_target_group.py b/lib/ansible/modules/cloud/amazon/elb_target_group.py index 2b2ec886499..322dfb11b15 100644 --- a/lib/ansible/modules/cloud/amazon/elb_target_group.py +++ b/lib/ansible/modules/cloud/amazon/elb_target_group.py @@ -58,6 +58,7 @@ options: - Whether or not to alter existing targets in the group to match what is passed with the module required: false default: yes + type: bool name: description: - The name of the target group. diff --git a/lib/ansible/modules/cloud/amazon/iam_cert.py b/lib/ansible/modules/cloud/amazon/iam_cert.py index 48794901b09..ffa7fdabf67 100644 --- a/lib/ansible/modules/cloud/amazon/iam_cert.py +++ b/lib/ansible/modules/cloud/amazon/iam_cert.py @@ -65,7 +65,7 @@ options: - By default the module will not upload a certificate that is already uploaded into AWS. If set to True, it will upload the certificate as long as the name is unique. default: False - + type: bool requirements: [ "boto" ] author: Jonathan I. Davila (@defionscode) diff --git a/lib/ansible/modules/cloud/amazon/iam_group.py b/lib/ansible/modules/cloud/amazon/iam_group.py index 765ebb25acd..c5b38600b9c 100644 --- a/lib/ansible/modules/cloud/amazon/iam_group.py +++ b/lib/ansible/modules/cloud/amazon/iam_group.py @@ -48,14 +48,16 @@ options: choices: [ 'present', 'absent' ] purge_policy: description: - - Deatach policy which not included in managed_policy list + - Detach policy which not included in managed_policy list required: false default: false + type: bool purge_users: description: - - Deatach users which not included in users list + - Detach users which not included in users list required: false default: false + type: bool requirements: [ botocore, boto3 ] extends_documentation_fragment: - aws diff --git a/lib/ansible/modules/cloud/amazon/iam_user.py b/lib/ansible/modules/cloud/amazon/iam_user.py index d43beb1bbde..c2443b2792c 100644 --- a/lib/ansible/modules/cloud/amazon/iam_user.py +++ b/lib/ansible/modules/cloud/amazon/iam_user.py @@ -33,6 +33,7 @@ options: - Detach policies which are not included in managed_policy list required: false default: false + type: bool requirements: [ botocore, boto3 ] extends_documentation_fragment: - aws diff --git a/lib/ansible/modules/cloud/amazon/kinesis_stream.py b/lib/ansible/modules/cloud/amazon/kinesis_stream.py index 95649d2d558..70f0d90e18a 100644 --- a/lib/ansible/modules/cloud/amazon/kinesis_stream.py +++ b/lib/ansible/modules/cloud/amazon/kinesis_stream.py @@ -46,6 +46,7 @@ options: description: - Wait for operation to complete before returning. default: true + type: bool wait_timeout: description: - How many seconds to wait for an operation to complete before timing out. diff --git a/lib/ansible/modules/cloud/amazon/rds_param_group.py b/lib/ansible/modules/cloud/amazon/rds_param_group.py index 53f195b346b..b67cf950f6e 100644 --- a/lib/ansible/modules/cloud/amazon/rds_param_group.py +++ b/lib/ansible/modules/cloud/amazon/rds_param_group.py @@ -78,6 +78,7 @@ options: - Whether to apply the changes immediately, or after the next reboot of any associated instances. aliases: - apply_immediately + type: bool params: description: - Map of parameter names and values. Numeric values may be represented as K for kilo (1024), M for mega (1024^2), G for giga (1024^3), @@ -89,8 +90,10 @@ options: version_added: "2.4" purge_tags: description: - - Whether or not to remove tags that do not appear in the I(tags) list. Defaults to false. + - Whether or not to remove tags that do not appear in the I(tags) list. version_added: "2.4" + type: bool + default: False author: - "Scott Anderson (@tastychutney)" - "Will Thames (@willthames)" diff --git a/lib/ansible/modules/cloud/amazon/route53.py b/lib/ansible/modules/cloud/amazon/route53.py index 2cc2d971ddf..09b8f20585a 100644 --- a/lib/ansible/modules/cloud/amazon/route53.py +++ b/lib/ansible/modules/cloud/amazon/route53.py @@ -71,6 +71,7 @@ options: overwrite: description: - Whether an existing record should be overwritten on create if values do not match + type: bool retry_interval: description: - In the case that route53 is still servicing a prior request, this module will wait and try again after this many seconds. If you have many diff --git a/lib/ansible/modules/cloud/amazon/s3_bucket.py b/lib/ansible/modules/cloud/amazon/s3_bucket.py index 1181afa5753..0e6ff39023f 100644 --- a/lib/ansible/modules/cloud/amazon/s3_bucket.py +++ b/lib/ansible/modules/cloud/amazon/s3_bucket.py @@ -51,6 +51,7 @@ options: description: - Enable API compatibility with Ceph. It takes into account the S3 API subset working with Ceph in order to provide the same module behaviour where possible. + type: bool version_added: "2.2" requester_pays: description: diff --git a/lib/ansible/modules/cloud/amazon/s3_sync.py b/lib/ansible/modules/cloud/amazon/s3_sync.py index 3b0d817cd68..d5975c3b676 100644 --- a/lib/ansible/modules/cloud/amazon/s3_sync.py +++ b/lib/ansible/modules/cloud/amazon/s3_sync.py @@ -95,6 +95,7 @@ options: required: false default: no version_added: "2.4" + type: bool requirements: - boto3 >= 1.4.4 diff --git a/lib/ansible/modules/cloud/amazon/sns_topic.py b/lib/ansible/modules/cloud/amazon/sns_topic.py index b379e4cf2ff..48513078302 100644 --- a/lib/ansible/modules/cloud/amazon/sns_topic.py +++ b/lib/ansible/modules/cloud/amazon/sns_topic.py @@ -63,6 +63,7 @@ options: somebody could come back later and confirm the subscription. Sorry. Blame Amazon." default: 'yes' + type: bool extends_documentation_fragment: - aws - ec2 diff --git a/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py b/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py index a102af59a4a..b67d9fc52b5 100644 --- a/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py +++ b/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py @@ -68,14 +68,17 @@ options: description: - Attach a public network interface to the server. default: True + type: bool use_private_network: description: - Attach a private network interface to the server. default: False + type: bool use_ipv6: description: - Enable IPv6 on the public network interface. default: True + type: bool anti_affinity_with: description: - UUID of another server to create an anti-affinity group with. diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index 7f2065a9582..7143c212fda 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -8,57 +8,31 @@ lib/ansible/modules/cloud/amazon/aws_application_scaling_policy.py E324 lib/ansible/modules/cloud/amazon/aws_application_scaling_policy.py E326 lib/ansible/modules/cloud/amazon/aws_direct_connect_gateway.py E322 lib/ansible/modules/cloud/amazon/aws_direct_connect_gateway.py E324 -lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py E325 -lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py E325 -lib/ansible/modules/cloud/amazon/aws_kms_facts.py E325 lib/ansible/modules/cloud/amazon/aws_s3.py E322 lib/ansible/modules/cloud/amazon/aws_s3.py E324 -lib/ansible/modules/cloud/amazon/aws_s3.py E325 lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py E324 -lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py E325 -lib/ansible/modules/cloud/amazon/aws_waf_condition.py E325 -lib/ansible/modules/cloud/amazon/aws_waf_rule.py E325 -lib/ansible/modules/cloud/amazon/aws_waf_web_acl.py E325 lib/ansible/modules/cloud/amazon/cloudformation.py E324 -lib/ansible/modules/cloud/amazon/cloudformation.py E325 -lib/ansible/modules/cloud/amazon/cloudformation_facts.py E325 lib/ansible/modules/cloud/amazon/cloudfront_distribution.py E324 -lib/ansible/modules/cloud/amazon/cloudfront_distribution.py E325 lib/ansible/modules/cloud/amazon/cloudfront_distribution.py E326 lib/ansible/modules/cloud/amazon/cloudfront_facts.py E323 -lib/ansible/modules/cloud/amazon/cloudfront_facts.py E325 lib/ansible/modules/cloud/amazon/cloudfront_invalidation.py E324 lib/ansible/modules/cloud/amazon/cloudfront_origin_access_identity.py E324 lib/ansible/modules/cloud/amazon/cloudtrail.py E324 -lib/ansible/modules/cloud/amazon/cloudtrail.py E325 -lib/ansible/modules/cloud/amazon/cloudwatchlogs_log_group.py E325 lib/ansible/modules/cloud/amazon/data_pipeline.py E322 lib/ansible/modules/cloud/amazon/dynamodb_ttl.py E324 lib/ansible/modules/cloud/amazon/ec2.py E322 -lib/ansible/modules/cloud/amazon/ec2.py E324 -lib/ansible/modules/cloud/amazon/ec2.py E325 -lib/ansible/modules/cloud/amazon/ec2.py E326 lib/ansible/modules/cloud/amazon/ec2_ami.py E324 -lib/ansible/modules/cloud/amazon/ec2_ami.py E325 -lib/ansible/modules/cloud/amazon/ec2_ami.py E326 -lib/ansible/modules/cloud/amazon/ec2_ami_copy.py E325 lib/ansible/modules/cloud/amazon/ec2_asg.py E324 -lib/ansible/modules/cloud/amazon/ec2_asg.py E325 lib/ansible/modules/cloud/amazon/ec2_asg.py E326 lib/ansible/modules/cloud/amazon/ec2_asg.py E327 lib/ansible/modules/cloud/amazon/ec2_asg_lifecycle_hook.py E327 lib/ansible/modules/cloud/amazon/ec2_eip.py E322 lib/ansible/modules/cloud/amazon/ec2_eip.py E324 -lib/ansible/modules/cloud/amazon/ec2_eip.py E325 lib/ansible/modules/cloud/amazon/ec2_elb.py E326 lib/ansible/modules/cloud/amazon/ec2_elb_facts.py E323 lib/ansible/modules/cloud/amazon/ec2_elb_lb.py E324 -lib/ansible/modules/cloud/amazon/ec2_elb_lb.py E325 lib/ansible/modules/cloud/amazon/ec2_group.py E322 -lib/ansible/modules/cloud/amazon/ec2_group.py E325 lib/ansible/modules/cloud/amazon/ec2_instance.py E324 -lib/ansible/modules/cloud/amazon/ec2_instance.py E325 -lib/ansible/modules/cloud/amazon/ec2_key.py E325 lib/ansible/modules/cloud/amazon/ec2_lc.py E322 lib/ansible/modules/cloud/amazon/ec2_lc.py E324 lib/ansible/modules/cloud/amazon/ec2_lc.py E325 @@ -67,25 +41,16 @@ lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py E324 lib/ansible/modules/cloud/amazon/ec2_scaling_policy.py E324 lib/ansible/modules/cloud/amazon/ec2_vol.py E322 lib/ansible/modules/cloud/amazon/ec2_vol.py E324 -lib/ansible/modules/cloud/amazon/ec2_vol.py E325 lib/ansible/modules/cloud/amazon/ec2_vol.py E326 lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py E322 lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py E325 lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py E324 -lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py E325 -lib/ansible/modules/cloud/amazon/ec2_vpc_net.py E325 -lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py E325 lib/ansible/modules/cloud/amazon/ec2_vpc_subnet.py E317 -lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E322 lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E323 lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E324 -lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E325 -lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py E325 lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py E326 lib/ansible/modules/cloud/amazon/ecs_cluster.py E324 -lib/ansible/modules/cloud/amazon/ecs_ecr.py E325 lib/ansible/modules/cloud/amazon/ecs_service_facts.py E324 -lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py E325 lib/ansible/modules/cloud/amazon/elasticache.py E324 lib/ansible/modules/cloud/amazon/elasticache.py E326 lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py E326 @@ -95,22 +60,17 @@ lib/ansible/modules/cloud/amazon/elb_classic_lb_facts.py E323 lib/ansible/modules/cloud/amazon/elb_instance.py E326 lib/ansible/modules/cloud/amazon/elb_target.py E327 lib/ansible/modules/cloud/amazon/elb_target_group.py E324 -lib/ansible/modules/cloud/amazon/elb_target_group.py E325 lib/ansible/modules/cloud/amazon/elb_target_group.py E326 lib/ansible/modules/cloud/amazon/execute_lambda.py E324 lib/ansible/modules/cloud/amazon/iam.py E317 lib/ansible/modules/cloud/amazon/iam.py E326 -lib/ansible/modules/cloud/amazon/iam_cert.py E325 -lib/ansible/modules/cloud/amazon/iam_group.py E325 lib/ansible/modules/cloud/amazon/iam_managed_policy.py E322 lib/ansible/modules/cloud/amazon/iam_managed_policy.py E324 lib/ansible/modules/cloud/amazon/iam_managed_policy.py E325 lib/ansible/modules/cloud/amazon/iam_policy.py E317 lib/ansible/modules/cloud/amazon/iam_policy.py E327 -lib/ansible/modules/cloud/amazon/iam_user.py E325 lib/ansible/modules/cloud/amazon/kinesis_stream.py E317 lib/ansible/modules/cloud/amazon/kinesis_stream.py E324 -lib/ansible/modules/cloud/amazon/kinesis_stream.py E325 lib/ansible/modules/cloud/amazon/kinesis_stream.py E326 lib/ansible/modules/cloud/amazon/lambda.py E323 lib/ansible/modules/cloud/amazon/lambda_alias.py E317 @@ -118,32 +78,26 @@ lib/ansible/modules/cloud/amazon/lambda_event.py E317 lib/ansible/modules/cloud/amazon/rds.py E322 lib/ansible/modules/cloud/amazon/rds.py E327 lib/ansible/modules/cloud/amazon/rds_param_group.py E324 -lib/ansible/modules/cloud/amazon/rds_param_group.py E325 lib/ansible/modules/cloud/amazon/rds_param_group.py E326 lib/ansible/modules/cloud/amazon/rds_subnet_group.py E324 lib/ansible/modules/cloud/amazon/redshift.py E322 lib/ansible/modules/cloud/amazon/redshift.py E325 lib/ansible/modules/cloud/amazon/redshift.py E326 lib/ansible/modules/cloud/amazon/redshift_subnet_group.py E324 -lib/ansible/modules/cloud/amazon/route53.py E325 lib/ansible/modules/cloud/amazon/route53.py E326 lib/ansible/modules/cloud/amazon/route53.py E327 lib/ansible/modules/cloud/amazon/route53_health_check.py E324 -lib/ansible/modules/cloud/amazon/s3_bucket.py E325 lib/ansible/modules/cloud/amazon/s3_lifecycle.py E322 lib/ansible/modules/cloud/amazon/s3_lifecycle.py E325 lib/ansible/modules/cloud/amazon/s3_sync.py E322 -lib/ansible/modules/cloud/amazon/s3_sync.py E325 lib/ansible/modules/cloud/amazon/s3_sync.py E326 lib/ansible/modules/cloud/amazon/s3_website.py E324 -lib/ansible/modules/cloud/amazon/sns_topic.py E325 lib/ansible/modules/cloud/amazon/sts_assume_role.py E317 lib/ansible/modules/cloud/atomic/atomic_container.py E317 lib/ansible/modules/cloud/centurylink/clc_alert_policy.py E317 lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E317 lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E324 lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py E326 -lib/ansible/modules/cloud/cloudscale/cloudscale_server.py E325 lib/ansible/modules/cloud/cloudstack/cs_cluster.py E326 lib/ansible/modules/cloud/cloudstack/cs_domain.py E325 lib/ansible/modules/cloud/cloudstack/cs_host.py E326