Skip to content

Commit

Permalink
Docs: sanity fixes (ansible-collections#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akasurde authored and goneri committed Jun 25, 2021
1 parent 91f2bc4 commit 645d308
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 49 deletions.
8 changes: 4 additions & 4 deletions plugins/modules/ec2_vpc_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -141,7 +141,7 @@
region: ap-southeast-2
'''

RETURN = '''
RETURN = r'''
endpoints:
description: The resulting endpoints from the module call
returned: success
Expand Down Expand Up @@ -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(),
)
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ec2_vpc_endpoint_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -77,7 +77,7 @@
register: endpoint_details
'''

RETURN = '''
RETURN = r'''
service_names:
description: AWS VPC endpoint service names
returned: I(query) is C(services)
Expand Down Expand Up @@ -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'),
)
)

Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ec2_vpc_igw_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__metaclass__ = type


DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: ec2_vpc_igw_info
version_added: 1.0.0
Expand All @@ -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
Expand All @@ -58,7 +58,7 @@
register: igw_info
'''

RETURN = '''
RETURN = r'''
internet_gateways:
description: The internet gateways for the account.
returned: always
Expand Down Expand Up @@ -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')
)
)

Expand Down
15 changes: 9 additions & 6 deletions plugins/modules/ec2_vpc_nacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 5 additions & 4 deletions plugins/modules/ec2_vpc_nacl_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
__metaclass__ = type


DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: ec2_vpc_nacl_info
version_added: 1.0.0
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -58,7 +59,7 @@
register: default_nacls
'''

RETURN = '''
RETURN = r'''
nacls:
description: Returns an array of complex objects as described below.
returned: success
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ec2_vpc_nat_gateway_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'),
)
)

Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ec2_vpc_peering_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -60,7 +60,7 @@
register: pending_vpc_peers
'''

RETURN = '''
RETURN = r'''
result:
description: The result of the describe.
returned: success
Expand Down Expand Up @@ -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'),
)
)

Expand Down
12 changes: 6 additions & 6 deletions plugins/modules/ec2_vpc_route_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__metaclass__ = type


DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: ec2_vpc_route_table
version_added: 1.0.0
Expand Down Expand Up @@ -81,7 +81,7 @@
'''

EXAMPLES = '''
EXAMPLES = r'''
# Note: These examples do not set authentication details, see the AWS Guide for details.
# Basic creation example:
Expand Down Expand Up @@ -124,7 +124,7 @@
state: absent
'''

RETURN = '''
RETURN = r'''
route_table:
description: Route Table result
returned: always
Expand Down Expand Up @@ -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()
)
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ec2_vpc_vgw_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__metaclass__ = type


DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: ec2_vpc_vgw_info
version_added: 1.0.0
Expand All @@ -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
Expand All @@ -58,7 +58,7 @@
register: vgw_info
'''

RETURN = '''
RETURN = r'''
virtual_gateways:
description: The virtual gateways for the account.
returned: always
Expand Down Expand Up @@ -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')
)
)

Expand Down
Loading

0 comments on commit 645d308

Please sign in to comment.