diff --git a/plugins/modules/ec2_vpc_endpoint.py b/plugins/modules/ec2_vpc_endpoint.py index 920cf45ca6e..833e64ae1db 100644 --- a/plugins/modules/ec2_vpc_endpoint.py +++ b/plugins/modules/ec2_vpc_endpoint.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' module: ec2_vpc_endpoint short_description: Create and delete AWS VPC Endpoints. version_added: 1.0.0 @@ -96,7 +96,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Create new vpc endpoint with a json template for policy @@ -141,7 +141,7 @@ region: ap-southeast-2 ''' -RETURN = ''' +RETURN = r''' endpoints: description: The resulting endpoints from the module call returned: success @@ -345,7 +345,7 @@ def main(): state=dict(default='present', choices=['present', 'absent']), wait=dict(type='bool', default=False), wait_timeout=dict(type='int', default=320, required=False), - route_table_ids=dict(type='list'), + route_table_ids=dict(type='list', elements='str'), vpc_endpoint_id=dict(), client_token=dict(), ) diff --git a/plugins/modules/ec2_vpc_endpoint_info.py b/plugins/modules/ec2_vpc_endpoint_info.py index a1f3ff0a901..eeb7a7d80d1 100644 --- a/plugins/modules/ec2_vpc_endpoint_info.py +++ b/plugins/modules/ec2_vpc_endpoint_info.py @@ -5,7 +5,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' module: ec2_vpc_endpoint_info short_description: Retrieves AWS VPC endpoints details using AWS methods. version_added: 1.0.0 @@ -41,7 +41,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Simple example of listing all support AWS services for VPC endpoints - name: List supported AWS endpoint services community.aws.ec2_vpc_endpoint_info: @@ -77,7 +77,7 @@ register: endpoint_details ''' -RETURN = ''' +RETURN = r''' service_names: description: AWS VPC endpoint service names returned: I(query) is C(services) @@ -169,7 +169,7 @@ def main(): dict( query=dict(choices=['services', 'endpoints'], required=True), filters=dict(default={}, type='dict'), - vpc_endpoint_ids=dict(type='list'), + vpc_endpoint_ids=dict(type='list', elements='str'), ) ) diff --git a/plugins/modules/ec2_vpc_igw_info.py b/plugins/modules/ec2_vpc_igw_info.py index f33020e0c24..2d8244f1282 100644 --- a/plugins/modules/ec2_vpc_igw_info.py +++ b/plugins/modules/ec2_vpc_igw_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_igw_info version_added: 1.0.0 @@ -33,7 +33,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all Internet Gateways for an account or profile @@ -58,7 +58,7 @@ register: igw_info ''' -RETURN = ''' +RETURN = r''' internet_gateways: description: The internet gateways for the account. returned: always @@ -132,7 +132,7 @@ def main(): argument_spec.update( dict( filters=dict(type='dict', default=dict()), - internet_gateway_ids=dict(type='list', default=None) + internet_gateway_ids=dict(type='list', default=None, elements='str') ) ) diff --git a/plugins/modules/ec2_vpc_nacl.py b/plugins/modules/ec2_vpc_nacl.py index f2ca5cda6f6..387ceb48f26 100644 --- a/plugins/modules/ec2_vpc_nacl.py +++ b/plugins/modules/ec2_vpc_nacl.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' module: ec2_vpc_nacl short_description: create and delete Network ACLs. version_added: 1.0.0 @@ -39,6 +39,7 @@ - Each subnet can be specified as subnet ID, or its tagged name. required: false type: list + elements: str egress: description: - A list of rules for outgoing traffic. Each rule must be specified as a list. @@ -50,6 +51,7 @@ default: [] required: false type: list + elements: list ingress: description: - List of rules for incoming traffic. Each rule must be specified as a list. @@ -61,6 +63,7 @@ default: [] required: false type: list + elements: list tags: description: - Dictionary of tags to look for and apply when creating a network ACL. @@ -82,7 +85,7 @@ requirements: [ botocore, boto3, json ] ''' -EXAMPLES = ''' +EXAMPLES = r''' # Complete example to create and delete a network ACL # that allows SSH, HTTP and ICMP in, and all traffic out. @@ -138,7 +141,7 @@ nacl_id: acl-33b4ee5b state: absent ''' -RETURN = ''' +RETURN = r''' task: description: The result of the create, or delete action. returned: success @@ -602,10 +605,10 @@ def main(): vpc_id=dict(), name=dict(), nacl_id=dict(), - subnets=dict(required=False, type='list', default=list()), + subnets=dict(required=False, type='list', default=list(), elements='str'), tags=dict(required=False, type='dict'), - ingress=dict(required=False, type='list', default=list()), - egress=dict(required=False, type='list', default=list()), + ingress=dict(required=False, type='list', default=list(), elements='list'), + egress=dict(required=False, type='list', default=list(), elements='list'), state=dict(default='present', choices=['present', 'absent']), ) module = AnsibleAWSModule(argument_spec=argument_spec, diff --git a/plugins/modules/ec2_vpc_nacl_info.py b/plugins/modules/ec2_vpc_nacl_info.py index 337a91d1c93..aabe489c112 100644 --- a/plugins/modules/ec2_vpc_nacl_info.py +++ b/plugins/modules/ec2_vpc_nacl_info.py @@ -5,7 +5,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_nacl_info version_added: 1.0.0 @@ -23,6 +23,7 @@ default: [] aliases: [nacl_id] type: list + elements: str filters: description: - A dict of filters to apply. Each dict item consists of a filter key and a filter value. See @@ -40,7 +41,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Note: These examples do not set authentication details, see the AWS Guide for details. # Gather information about all Network ACLs: @@ -58,7 +59,7 @@ register: default_nacls ''' -RETURN = ''' +RETURN = r''' nacls: description: Returns an array of complex objects as described below. returned: success @@ -205,7 +206,7 @@ def nacl_entry_to_list(entry): def main(): argument_spec = dict( - nacl_ids=dict(default=[], type='list', aliases=['nacl_id']), + nacl_ids=dict(default=[], type='list', aliases=['nacl_id'], elements='str'), filters=dict(default={}, type='dict')) module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) diff --git a/plugins/modules/ec2_vpc_nat_gateway_info.py b/plugins/modules/ec2_vpc_nat_gateway_info.py index b734721b5ea..bb164a2b50b 100644 --- a/plugins/modules/ec2_vpc_nat_gateway_info.py +++ b/plugins/modules/ec2_vpc_nat_gateway_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' module: ec2_vpc_nat_gateway_info short_description: Retrieves AWS VPC Managed Nat Gateway details using AWS methods. version_added: 1.0.0 @@ -33,7 +33,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Simple example of listing all nat gateways - name: List all managed nat gateways in ap-southeast-2 community.aws.ec2_vpc_nat_gateway_info: @@ -68,7 +68,7 @@ register: existing_nat_gateways ''' -RETURN = ''' +RETURN = r''' result: description: The result of the describe, converted to ansible snake case style. See http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.describe_nat_gateways for the response. @@ -127,7 +127,7 @@ def main(): argument_spec.update( dict( filters=dict(default={}, type='dict'), - nat_gateway_ids=dict(default=[], type='list'), + nat_gateway_ids=dict(default=[], type='list', elements='str'), ) ) diff --git a/plugins/modules/ec2_vpc_peering_info.py b/plugins/modules/ec2_vpc_peering_info.py index f552358e362..2d577227fac 100644 --- a/plugins/modules/ec2_vpc_peering_info.py +++ b/plugins/modules/ec2_vpc_peering_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' module: ec2_vpc_peering_info short_description: Retrieves AWS VPC Peering details using AWS methods. version_added: 1.0.0 @@ -33,7 +33,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Simple example of listing all VPC Peers - name: List all vpc peers community.aws.ec2_vpc_peering_info: @@ -60,7 +60,7 @@ register: pending_vpc_peers ''' -RETURN = ''' +RETURN = r''' result: description: The result of the describe. returned: success @@ -107,7 +107,7 @@ def main(): argument_spec.update( dict( filters=dict(default=dict(), type='dict'), - peer_connection_ids=dict(default=None, type='list'), + peer_connection_ids=dict(default=None, type='list', elements='str'), ) ) diff --git a/plugins/modules/ec2_vpc_route_table.py b/plugins/modules/ec2_vpc_route_table.py index 39f0ffc42bf..ca5d586b2e7 100644 --- a/plugins/modules/ec2_vpc_route_table.py +++ b/plugins/modules/ec2_vpc_route_table.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_route_table version_added: 1.0.0 @@ -81,7 +81,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Note: These examples do not set authentication details, see the AWS Guide for details. # Basic creation example: @@ -124,7 +124,7 @@ state: absent ''' -RETURN = ''' +RETURN = r''' route_table: description: Route Table result returned: always @@ -710,14 +710,14 @@ def ensure_route_table_present(connection, module): def main(): argument_spec = dict( lookup=dict(default='tag', choices=['tag', 'id']), - propagating_vgw_ids=dict(type='list'), + propagating_vgw_ids=dict(type='list', elements='str'), purge_routes=dict(default=True, type='bool'), purge_subnets=dict(default=True, type='bool'), purge_tags=dict(default=False, type='bool'), route_table_id=dict(), - routes=dict(default=[], type='list'), + routes=dict(default=[], type='list', elements='dict'), state=dict(default='present', choices=['present', 'absent']), - subnets=dict(type='list'), + subnets=dict(type='list', elements='str'), tags=dict(type='dict', aliases=['resource_tags']), vpc_id=dict() ) diff --git a/plugins/modules/ec2_vpc_vgw_info.py b/plugins/modules/ec2_vpc_vgw_info.py index 5c7b866c7d6..43a5c2f8c4e 100644 --- a/plugins/modules/ec2_vpc_vgw_info.py +++ b/plugins/modules/ec2_vpc_vgw_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_vgw_info version_added: 1.0.0 @@ -33,7 +33,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all virtual gateways for an account or profile @@ -58,7 +58,7 @@ register: vgw_info ''' -RETURN = ''' +RETURN = r''' virtual_gateways: description: The virtual gateways for the account. returned: always @@ -138,7 +138,7 @@ def main(): argument_spec.update( dict( filters=dict(type='dict', default=dict()), - vpn_gateway_ids=dict(type='list', default=None) + vpn_gateway_ids=dict(type='list', default=None, elements='str') ) ) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 1ac818485bb..9067d522129 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_vpn version_added: 1.0.0 @@ -141,7 +141,7 @@ default: 15 ''' -EXAMPLES = """ +EXAMPLES = r""" # Note: None of these examples set aws_access_key, aws_secret_key, or region. # It is assumed that their matching environment variables are set. @@ -214,7 +214,7 @@ Ansible: Tag """ -RETURN = """ +RETURN = r""" changed: description: If the VPN connection has changed. type: bool @@ -742,12 +742,12 @@ def main(): vpn_gateway_id=dict(type='str'), tags=dict(default={}, type='dict'), connection_type=dict(default='ipsec.1', type='str'), - tunnel_options=dict(no_log=True, type='list', default=[]), + tunnel_options=dict(no_log=True, type='list', default=[], elements='dict'), static_only=dict(default=False, type='bool'), customer_gateway_id=dict(type='str'), vpn_connection_id=dict(type='str'), purge_tags=dict(type='bool', default=False), - routes=dict(type='list', default=[]), + routes=dict(type='list', default=[], elements='str'), purge_routes=dict(type='bool', default=False), wait_timeout=dict(type='int', default=600), delay=dict(type='int', default=15), diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 1ba8210a722..e96583f669e 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_vpn_info version_added: 1.0.0 @@ -35,7 +35,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all vpn connections community.aws.ec2_vpc_vpn_info: @@ -53,7 +53,7 @@ register: vpn_conn_info ''' -RETURN = ''' +RETURN = r''' vpn_connections: description: List of one or more VPN Connections. returned: always @@ -198,7 +198,7 @@ def list_vpn_connections(connection, module): def main(): argument_spec = dict( - vpn_connection_ids=dict(default=[], type='list'), + vpn_connection_ids=dict(default=[], type='list', elements='str'), filters=dict(default={}, type='dict') )