AWS: _facts -> _info (part 4) (#57651)

* Rename ec2_vpc_dhcp_option_facts -> ec2_vpc_dhcp_option_info.

* Rename ec2_vpc_endpoint_facts -> ec2_vpc_endpoint_info.

* Rename ec2_vpc_igw_facts -> ec2_vpc_igw_info.

* Rename ec2_vpc_nacl_facts -> ec2_vpc_nacl_info.

* Rename ec2_vpc_nat_gateway_facts -> ec2_vpc_nat_gateway_info.

* Rename ec2_vpc_net_facts -> ec2_vpc_net_info.

* Rename ec2_vpc_peering_facts -> ec2_vpc_peering_info.

* Rename ec2_vpc_route_table_facts -> ec2_vpc_route_table_info.

* Rename ec2_vpc_subnet_facts -> ec2_vpc_subnet_info.

* Rename ec2_vpc_vgw_facts -> ec2_vpc_vgw_info.

* Rename ec2_vpc_vpn_facts -> ec2_vpc_vpn_info.

* Update module defaults, add changelog and porting guide.

* Update BOTMETA.
This commit is contained in:
Felix Fontein 2019-06-10 21:40:05 +02:00 committed by GitHub
parent 598a058afe
commit 13f73adef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 200 additions and 133 deletions

10
.github/BOTMETA.yml vendored
View file

@ -71,13 +71,13 @@ files:
$modules/cloud/amazon/ec2_tag.py: $team_ansible $modules/cloud/amazon/ec2_tag.py: $team_ansible
$modules/cloud/amazon/ec2_vol.py: $team_ansible $modules/cloud/amazon/ec2_vol.py: $team_ansible
$modules/cloud/amazon/ec2_vpc_endpoint.py: willthames $modules/cloud/amazon/ec2_vpc_endpoint.py: willthames
$modules/cloud/amazon/ec2_vpc_endpoint_facts.py: willthames $modules/cloud/amazon/ec2_vpc_endpoint_info.py: willthames
$modules/cloud/amazon/ec2_vpc_igw.py: willthames $modules/cloud/amazon/ec2_vpc_igw.py: willthames
$modules/cloud/amazon/ec2_vpc_igw_facts.py: willthames $modules/cloud/amazon/ec2_vpc_igw_info.py: willthames
$modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py: willthames $modules/cloud/amazon/ec2_vpc_nat_gateway_info.py: willthames
$modules/cloud/amazon/ec2_vpc_net.py: $team_ansible $modules/cloud/amazon/ec2_vpc_net.py: $team_ansible
$modules/cloud/amazon/ec2_vpc_net_facts.py: whiter $modules/cloud/amazon/ec2_vpc_net_info.py: whiter
$modules/cloud/amazon/ec2_vpc_peering_facts.py: willthames $modules/cloud/amazon/ec2_vpc_peering_info.py: willthames
$modules/cloud/amazon/ec2_vpc_subnet.py: willthames $modules/cloud/amazon/ec2_vpc_subnet.py: willthames
$modules/cloud/amazon/ecs_cluster.py: willthames $modules/cloud/amazon/ecs_cluster.py: willthames
$modules/cloud/amazon/ecs_ecr.py: willthames $modules/cloud/amazon/ecs_ecr.py: willthames

View file

@ -0,0 +1,12 @@
minor_changes:
- The ``ec2_vpc_dhcp_option_facts`` module has been renamed to ``ec2_vpc_dhcp_option_info``.
- The ``ec2_vpc_endpoint_facts`` module has been renamed to ``ec2_vpc_endpoint_info``.
- The ``ec2_vpc_igw_facts`` module has been renamed to ``ec2_vpc_igw_info``.
- The ``ec2_vpc_nacl_facts`` module has been renamed to ``ec2_vpc_nacl_info``.
- The ``ec2_vpc_nat_gateway_facts`` module has been renamed to ``ec2_vpc_nat_gateway_info``.
- The ``ec2_vpc_net_facts`` module has been renamed to ``ec2_vpc_net_info``.
- The ``ec2_vpc_peering_facts`` module has been renamed to ``ec2_vpc_peering_info``.
- The ``ec2_vpc_route_table_facts`` module has been renamed to ``ec2_vpc_route_table_info``.
- The ``ec2_vpc_subnet_facts`` module has been renamed to ``ec2_vpc_subnet_info``.
- The ``ec2_vpc_vgw_facts`` module has been renamed to ``ec2_vpc_vgw_info``.
- The ``ec2_vpc_vpn_facts`` module has been renamed to ``ec2_vpc_vpn_info``.

View file

@ -115,6 +115,17 @@ Noteworthy module changes
* The ``ec2_placement_group_facts`` module was renamed to :ref:`ec2_placement_group_info <ec2_placement_group_info_module>`. * The ``ec2_placement_group_facts`` module was renamed to :ref:`ec2_placement_group_info <ec2_placement_group_info_module>`.
* The ``ec2_snapshot_facts`` module was renamed to :ref:`ec2_snapshot_info <ec2_snapshot_info_module>`. * The ``ec2_snapshot_facts`` module was renamed to :ref:`ec2_snapshot_info <ec2_snapshot_info_module>`.
* The ``ec2_vol_facts`` module was renamed to :ref:`ec2_vol_info <ec2_vol_info_module>`. * The ``ec2_vol_facts`` module was renamed to :ref:`ec2_vol_info <ec2_vol_info_module>`.
* The ``ec2_vpc_dhcp_option_facts`` module was renamed to :ref:`ec2_vpc_dhcp_option_info <ec2_vpc_dhcp_option_info_module>`.
* The ``ec2_vpc_endpoint_facts`` module was renamed to :ref:`ec2_vpc_endpoint_info <ec2_vpc_endpoint_info_module>`.
* The ``ec2_vpc_igw_facts`` module was renamed to :ref:`ec2_vpc_igw_info <ec2_vpc_igw_info_module>`.
* The ``ec2_vpc_nacl_facts`` module was renamed to :ref:`ec2_vpc_nacl_info <ec2_vpc_nacl_info_module>`.
* The ``ec2_vpc_nat_gateway_facts`` module was renamed to :ref:`ec2_vpc_nat_gateway_info <ec2_vpc_nat_gateway_info_module>`.
* The ``ec2_vpc_net_facts`` module was renamed to :ref:`ec2_vpc_net_info <ec2_vpc_net_info_module>`.
* The ``ec2_vpc_peering_facts`` module was renamed to :ref:`ec2_vpc_peering_info <ec2_vpc_peering_info_module>`.
* The ``ec2_vpc_route_table_facts`` module was renamed to :ref:`ec2_vpc_route_table_info <ec2_vpc_route_table_info_module>`.
* The ``ec2_vpc_subnet_facts`` module was renamed to :ref:`ec2_vpc_subnet_info <ec2_vpc_subnet_info_module>`.
* The ``ec2_vpc_vgw_facts`` module was renamed to :ref:`ec2_vpc_vgw_info <ec2_vpc_vgw_info_module>`.
* The ``ec2_vpc_vpn_facts`` module was renamed to :ref:`ec2_vpc_vpn_info <ec2_vpc_vpn_info_module>`.
* The ``elasticache_facts`` module was renamed to :ref:`elasticache_info <elasticache_info_module>`. * The ``elasticache_facts`` module was renamed to :ref:`elasticache_info <elasticache_info_module>`.
* The ``elb_application_lb_facts`` module was renamed to :ref:`elb_application_lb_info <elb_application_lb_info_module>`. * The ``elb_application_lb_facts`` module was renamed to :ref:`elb_application_lb_info <elb_application_lb_info_module>`.
* The ``elb_classic_lb_facts`` module was renamed to :ref:`elb_classic_lb_info <elb_classic_lb_info_module>`. * The ``elb_classic_lb_facts`` module was renamed to :ref:`elb_classic_lb_info <elb_classic_lb_info_module>`.

View file

@ -72,7 +72,7 @@ Setting a default AWS region for specific EC2-related modules::
region: '{{ my_region }}' region: '{{ my_region }}'
ec2_instance_info: ec2_instance_info:
region: '{{ my_region }}' region: '{{ my_region }}'
ec2_vpc_net_facts: ec2_vpc_net_info:
region: '{{ my_region }}' region: '{{ my_region }}'
.. _module_defaults_groups: .. _module_defaults_groups:

View file

@ -180,49 +180,49 @@ groupings:
- aws - aws
ec2_vpc_dhcp_option: ec2_vpc_dhcp_option:
- aws - aws
ec2_vpc_dhcp_option_facts: ec2_vpc_dhcp_option_info:
- aws - aws
ec2_vpc_egress_igw: ec2_vpc_egress_igw:
- aws - aws
ec2_vpc_endpoint: ec2_vpc_endpoint:
- aws - aws
ec2_vpc_endpoint_facts: ec2_vpc_endpoint_info:
- aws - aws
ec2_vpc_igw: ec2_vpc_igw:
- aws - aws
ec2_vpc_igw_facts: ec2_vpc_igw_info:
- aws - aws
ec2_vpc_nacl: ec2_vpc_nacl:
- aws - aws
ec2_vpc_nacl_facts: ec2_vpc_nacl_info:
- aws - aws
ec2_vpc_nat_gateway: ec2_vpc_nat_gateway:
- aws - aws
ec2_vpc_nat_gateway_facts: ec2_vpc_nat_gateway_info:
- aws - aws
ec2_vpc_net: ec2_vpc_net:
- aws - aws
ec2_vpc_net_facts: ec2_vpc_net_info:
- aws - aws
ec2_vpc_peer: ec2_vpc_peer:
- aws - aws
ec2_vpc_peering_facts: ec2_vpc_peering_info:
- aws - aws
ec2_vpc_route_table: ec2_vpc_route_table:
- aws - aws
ec2_vpc_route_table_facts: ec2_vpc_route_table_info:
- aws - aws
ec2_vpc_subnet: ec2_vpc_subnet:
- aws - aws
ec2_vpc_subnet_facts: ec2_vpc_subnet_info:
- aws - aws
ec2_vpc_vgw: ec2_vpc_vgw:
- aws - aws
ec2_vpc_vgw_facts: ec2_vpc_vgw_info:
- aws - aws
ec2_vpc_vpn: ec2_vpc_vpn:
- aws - aws
ec2_vpc_vpn_facts: ec2_vpc_vpn_info:
- aws - aws
ec2_win_password: ec2_win_password:
- aws - aws

View file

@ -0,0 +1 @@
ec2_vpc_dhcp_option_info.py

View file

@ -0,0 +1 @@
ec2_vpc_endpoint_info.py

View file

@ -0,0 +1 @@
ec2_vpc_igw_info.py

View file

@ -0,0 +1 @@
ec2_vpc_nacl_info.py

View file

@ -0,0 +1 @@
ec2_vpc_nat_gateway_info.py

View file

@ -0,0 +1 @@
ec2_vpc_net_info.py

View file

@ -0,0 +1 @@
ec2_vpc_peering_info.py

View file

@ -0,0 +1 @@
ec2_vpc_route_table_info.py

View file

@ -0,0 +1 @@
ec2_vpc_subnet_info.py

View file

@ -0,0 +1 @@
ec2_vpc_vgw_info.py

View file

@ -0,0 +1 @@
ec2_vpc_vpn_info.py

View file

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_dhcp_option_facts module: ec2_vpc_dhcp_option_info
short_description: Gather facts about dhcp options sets in AWS short_description: Gather information about dhcp options sets in AWS
description: description:
- Gather facts about dhcp options sets in AWS - Gather information about dhcp options sets in AWS
- This module was called C(ec2_vpc_dhcp_option_facts) before Ansible 2.9. The usage did not change.
version_added: "2.2" version_added: "2.2"
requirements: [ boto3 ] requirements: [ boto3 ]
author: "Nick Aslanidis (@naslanidis)" author: "Nick Aslanidis (@naslanidis)"
@ -38,26 +39,26 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# # Note: These examples do not set authentication details, see the AWS Guide for details. # # Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Gather facts about all DHCP Option sets for an account or profile - name: Gather information about all DHCP Option sets for an account or profile
ec2_vpc_dhcp_option_facts: ec2_vpc_dhcp_option_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
register: dhcp_facts register: dhcp_info
- name: Gather facts about a filtered list of DHCP Option sets - name: Gather information about a filtered list of DHCP Option sets
ec2_vpc_dhcp_option_facts: ec2_vpc_dhcp_option_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
filters: filters:
"tag:Name": "abc-123" "tag:Name": "abc-123"
register: dhcp_facts register: dhcp_info
- name: Gather facts about a specific DHCP Option set by DhcpOptionId - name: Gather information about a specific DHCP Option set by DhcpOptionId
ec2_vpc_dhcp_option_facts: ec2_vpc_dhcp_option_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
DhcpOptionsIds: dopt-123fece2 DhcpOptionsIds: dopt-123fece2
register: dhcp_facts register: dhcp_info
''' '''
@ -124,6 +125,8 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True) supports_check_mode=True)
if module._name == 'ec2_vpc_dhcp_option_facts':
module.deprecate("The 'ec2_vpc_dhcp_option_facts' module has been renamed to 'ec2_vpc_dhcp_option_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not HAS_BOTO3: if not HAS_BOTO3:

View file

@ -27,7 +27,7 @@ options:
required: false required: false
service: service:
description: description:
- An AWS supported vpc endpoint service. Use the ec2_vpc_endpoint_facts - An AWS supported vpc endpoint service. Use the M(ec2_vpc_endpoint_info)
module to describe the supported endpoint services. module to describe the supported endpoint services.
- Required when creating an endpoint. - Required when creating an endpoint.
required: false required: false

View file

@ -10,10 +10,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'community'} 'supported_by': 'community'}
DOCUMENTATION = ''' DOCUMENTATION = '''
module: ec2_vpc_endpoint_facts module: ec2_vpc_endpoint_info
short_description: Retrieves AWS VPC endpoints details using AWS methods. short_description: Retrieves AWS VPC endpoints details using AWS methods.
description: description:
- Gets various details related to AWS VPC Endpoints - Gets various details related to AWS VPC Endpoints
- This module was called C(ec2_vpc_endpoint_facts) before Ansible 2.9. The usage did not change.
version_added: "2.4" version_added: "2.4"
requirements: [ boto3 ] requirements: [ boto3 ]
options: options:
@ -43,19 +44,19 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Simple example of listing all support AWS services for VPC endpoints # Simple example of listing all support AWS services for VPC endpoints
- name: List supported AWS endpoint services - name: List supported AWS endpoint services
ec2_vpc_endpoint_facts: ec2_vpc_endpoint_info:
query: services query: services
region: ap-southeast-2 region: ap-southeast-2
register: supported_endpoint_services register: supported_endpoint_services
- name: Get all endpoints in ap-southeast-2 region - name: Get all endpoints in ap-southeast-2 region
ec2_vpc_endpoint_facts: ec2_vpc_endpoint_info:
query: endpoints query: endpoints
region: ap-southeast-2 region: ap-southeast-2
register: existing_endpoints register: existing_endpoints
- name: Get all endpoints with specific filters - name: Get all endpoints with specific filters
ec2_vpc_endpoint_facts: ec2_vpc_endpoint_info:
query: endpoints query: endpoints
region: ap-southeast-2 region: ap-southeast-2
filters: filters:
@ -68,7 +69,7 @@ EXAMPLES = '''
register: existing_endpoints register: existing_endpoints
- name: Get details on specific endpoint - name: Get details on specific endpoint
ec2_vpc_endpoint_facts: ec2_vpc_endpoint_info:
query: endpoints query: endpoints
region: ap-southeast-2 region: ap-southeast-2
vpc_endpoint_ids: vpc_endpoint_ids:
@ -167,6 +168,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vpc_endpoint_facts':
module.deprecate("The 'ec2_vpc_endpoint_facts' module has been renamed to 'ec2_vpc_endpoint_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not HAS_BOTO3: if not HAS_BOTO3:

View file

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_igw_facts module: ec2_vpc_igw_info
short_description: Gather facts about internet gateways in AWS short_description: Gather information about internet gateways in AWS
description: description:
- Gather facts about internet gateways in AWS. - Gather information about internet gateways in AWS.
- This module was called C(ec2_vpc_igw_facts) before Ansible 2.9. The usage did not change.
version_added: "2.3" version_added: "2.3"
requirements: [ boto3 ] requirements: [ boto3 ]
author: "Nick Aslanidis (@naslanidis)" author: "Nick Aslanidis (@naslanidis)"
@ -36,26 +37,26 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# # Note: These examples do not set authentication details, see the AWS Guide for details. # # Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Gather facts about all Internet Gateways for an account or profile - name: Gather information about all Internet Gateways for an account or profile
ec2_vpc_igw_facts: ec2_vpc_igw_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
register: igw_facts register: igw_info
- name: Gather facts about a filtered list of Internet Gateways - name: Gather information about a filtered list of Internet Gateways
ec2_vpc_igw_facts: ec2_vpc_igw_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
filters: filters:
"tag:Name": "igw-123" "tag:Name": "igw-123"
register: igw_facts register: igw_info
- name: Gather facts about a specific internet gateway by InternetGatewayId - name: Gather information about a specific internet gateway by InternetGatewayId
ec2_vpc_igw_facts: ec2_vpc_igw_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
internet_gateway_ids: igw-c1231234 internet_gateway_ids: igw-c1231234
register: igw_facts register: igw_info
''' '''
RETURN = ''' RETURN = '''
@ -132,6 +133,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vpc_igw_facts':
module.deprecate("The 'ec2_vpc_igw_facts' module has been renamed to 'ec2_vpc_igw_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not HAS_BOTO3: if not HAS_BOTO3:

View file

@ -12,17 +12,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_nacl_facts module: ec2_vpc_nacl_info
short_description: Gather facts about Network ACLs in an AWS VPC short_description: Gather information about Network ACLs in an AWS VPC
description: description:
- Gather facts about Network ACLs in an AWS VPC - Gather information about Network ACLs in an AWS VPC
- This module was called C(ec2_vpc_nacl_facts) before Ansible 2.9. The usage did not change.
version_added: "2.2" version_added: "2.2"
author: "Brad Davidson (@brandond)" author: "Brad Davidson (@brandond)"
requirements: [ boto3 ] requirements: [ boto3 ]
options: options:
nacl_ids: nacl_ids:
description: description:
- A list of Network ACL IDs to retrieve facts about. - A list of Network ACL IDs to retrieve information about.
required: false required: false
default: [] default: []
aliases: [nacl_id] aliases: [nacl_id]
@ -44,16 +45,16 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details. # Note: These examples do not set authentication details, see the AWS Guide for details.
# Gather facts about all Network ACLs: # Gather information about all Network ACLs:
- name: Get All NACLs - name: Get All NACLs
register: all_nacls register: all_nacls
ec2_vpc_nacl_facts: ec2_vpc_nacl_info:
region: us-west-2 region: us-west-2
# Retrieve default Network ACLs: # Retrieve default Network ACLs:
- name: Get Default NACLs - name: Get Default NACLs
register: default_nacls register: default_nacls
ec2_vpc_nacl_facts: ec2_vpc_nacl_info:
region: us-west-2 region: us-west-2
filters: filters:
'default': 'true' 'default': 'true'
@ -211,6 +212,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vpc_nacl_facts':
module.deprecate("The 'ec2_vpc_nacl_facts' module has been renamed to 'ec2_vpc_nacl_info'", version='2.13')
if not HAS_BOTO3: if not HAS_BOTO3:
module.fail_json(msg='boto3 required for this module') module.fail_json(msg='boto3 required for this module')

View file

@ -12,10 +12,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
module: ec2_vpc_nat_gateway_facts module: ec2_vpc_nat_gateway_info
short_description: Retrieves AWS VPC Managed Nat Gateway details using AWS methods. short_description: Retrieves AWS VPC Managed Nat Gateway details using AWS methods.
description: description:
- Gets various details related to AWS VPC Managed Nat Gateways - Gets various details related to AWS VPC Managed Nat Gateways
- This module was called C(ec2_vpc_nat_gateway_facts) before Ansible 2.9. The usage did not change.
version_added: "2.3" version_added: "2.3"
requirements: [ boto3 ] requirements: [ boto3 ]
options: options:
@ -36,7 +37,7 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Simple example of listing all nat gateways # Simple example of listing all nat gateways
- name: List all managed nat gateways in ap-southeast-2 - name: List all managed nat gateways in ap-southeast-2
ec2_vpc_nat_gateway_facts: ec2_vpc_nat_gateway_info:
region: ap-southeast-2 region: ap-southeast-2
register: all_ngws register: all_ngws
@ -45,7 +46,7 @@ EXAMPLES = '''
msg: "{{ all_ngws.result }}" msg: "{{ all_ngws.result }}"
- name: Get details on specific nat gateways - name: Get details on specific nat gateways
ec2_vpc_nat_gateway_facts: ec2_vpc_nat_gateway_info:
nat_gateway_ids: nat_gateway_ids:
- nat-1234567891234567 - nat-1234567891234567
- nat-7654321987654321 - nat-7654321987654321
@ -53,14 +54,14 @@ EXAMPLES = '''
register: specific_ngws register: specific_ngws
- name: Get all nat gateways with specific filters - name: Get all nat gateways with specific filters
ec2_vpc_nat_gateway_facts: ec2_vpc_nat_gateway_info:
region: ap-southeast-2 region: ap-southeast-2
filters: filters:
state: ['pending'] state: ['pending']
register: pending_ngws register: pending_ngws
- name: Get nat gateways with specific filter - name: Get nat gateways with specific filter
ec2_vpc_nat_gateway_facts: ec2_vpc_nat_gateway_info:
region: ap-southeast-2 region: ap-southeast-2
filters: filters:
subnet-id: subnet-12345678 subnet-id: subnet-12345678
@ -127,6 +128,8 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True) supports_check_mode=True)
if module._name == 'ec2_vpc_nat_gateway_facts':
module.deprecate("The 'ec2_vpc_nat_gateway_facts' module has been renamed to 'ec2_vpc_nat_gateway_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not HAS_BOTO3: if not HAS_BOTO3:

View file

@ -20,10 +20,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_net_facts module: ec2_vpc_net_info
short_description: Gather facts about ec2 VPCs in AWS short_description: Gather information about ec2 VPCs in AWS
description: description:
- Gather facts about ec2 VPCs in AWS - Gather information about ec2 VPCs in AWS
- This module was called C(ec2_vpc_net_facts) before Ansible 2.9. The usage did not change.
version_added: "2.1" version_added: "2.1"
author: "Rob White (@wimnat)" author: "Rob White (@wimnat)"
requirements: requirements:
@ -46,15 +47,15 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details. # Note: These examples do not set authentication details, see the AWS Guide for details.
# Gather facts about all VPCs # Gather information about all VPCs
- ec2_vpc_net_facts: - ec2_vpc_net_info:
# Gather facts about a particular VPC using VPC ID # Gather information about a particular VPC using VPC ID
- ec2_vpc_net_facts: - ec2_vpc_net_info:
vpc_ids: vpc-00112233 vpc_ids: vpc-00112233
# Gather facts about any VPC with a tag key Name and value Example # Gather information about any VPC with a tag key Name and value Example
- ec2_vpc_net_facts: - ec2_vpc_net_info:
filters: filters:
"tag:Name": Example "tag:Name": Example
@ -272,6 +273,8 @@ def main():
)) ))
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vpc_net_facts':
module.deprecate("The 'ec2_vpc_net_facts' module has been renamed to 'ec2_vpc_net_info'", version='2.13')
if not HAS_BOTO3: if not HAS_BOTO3:
module.fail_json(msg='boto3 and botocore are required for this module') module.fail_json(msg='boto3 and botocore are required for this module')

View file

@ -11,10 +11,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'community'} 'supported_by': 'community'}
DOCUMENTATION = ''' DOCUMENTATION = '''
module: ec2_vpc_peering_facts module: ec2_vpc_peering_info
short_description: Retrieves AWS VPC Peering details using AWS methods. short_description: Retrieves AWS VPC Peering details using AWS methods.
description: description:
- Gets various details related to AWS VPC Peers - Gets various details related to AWS VPC Peers
- This module was called C(ec2_vpc_peering_facts) before Ansible 2.9. The usage did not change.
version_added: "2.4" version_added: "2.4"
requirements: [ boto3 ] requirements: [ boto3 ]
options: options:
@ -35,7 +36,7 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Simple example of listing all VPC Peers # Simple example of listing all VPC Peers
- name: List all vpc peers - name: List all vpc peers
ec2_vpc_peering_facts: ec2_vpc_peering_info:
region: ap-southeast-2 region: ap-southeast-2
register: all_vpc_peers register: all_vpc_peers
@ -44,7 +45,7 @@ EXAMPLES = '''
msg: "{{ all_vpc_peers.result }}" msg: "{{ all_vpc_peers.result }}"
- name: Get details on specific VPC peer - name: Get details on specific VPC peer
ec2_vpc_peering_facts: ec2_vpc_peering_info:
peer_connection_ids: peer_connection_ids:
- pcx-12345678 - pcx-12345678
- pcx-87654321 - pcx-87654321
@ -52,7 +53,7 @@ EXAMPLES = '''
register: all_vpc_peers register: all_vpc_peers
- name: Get all vpc peers with specific filters - name: Get all vpc peers with specific filters
ec2_vpc_peering_facts: ec2_vpc_peering_info:
region: ap-southeast-2 region: ap-southeast-2
filters: filters:
status-code: ['pending-acceptance'] status-code: ['pending-acceptance']
@ -107,6 +108,8 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True) supports_check_mode=True)
if module._name == 'ec2_vpc_peering_facts':
module.deprecate("The 'ec2_vpc_peering_facts' module has been renamed to 'ec2_vpc_peering_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not HAS_BOTO3: if not HAS_BOTO3:

View file

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_route_table_facts module: ec2_vpc_route_table_info
short_description: Gather facts about ec2 VPC route tables in AWS short_description: Gather information about ec2 VPC route tables in AWS
description: description:
- Gather facts about ec2 VPC route tables in AWS - Gather information about ec2 VPC route tables in AWS
- This module was called C(ec2_vpc_route_table_facts) before Ansible 2.9. The usage did not change.
version_added: "2.0" version_added: "2.0"
author: "Rob White (@wimnat)" author: "Rob White (@wimnat)"
options: options:
@ -32,21 +33,21 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details. # Note: These examples do not set authentication details, see the AWS Guide for details.
# Gather facts about all VPC route tables # Gather information about all VPC route tables
- ec2_vpc_route_table_facts: - ec2_vpc_route_table_info:
# Gather facts about a particular VPC route table using route table ID # Gather information about a particular VPC route table using route table ID
- ec2_vpc_route_table_facts: - ec2_vpc_route_table_info:
filters: filters:
route-table-id: rtb-00112233 route-table-id: rtb-00112233
# Gather facts about any VPC route table with a tag key Name and value Example # Gather information about any VPC route table with a tag key Name and value Example
- ec2_vpc_route_table_facts: - ec2_vpc_route_table_info:
filters: filters:
"tag:Name": Example "tag:Name": Example
# Gather facts about any VPC route table within VPC with ID vpc-abcdef00 # Gather information about any VPC route table within VPC with ID vpc-abcdef00
- ec2_vpc_route_table_facts: - ec2_vpc_route_table_info:
filters: filters:
vpc-id: vpc-abcdef00 vpc-id: vpc-abcdef00
@ -109,6 +110,8 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True) supports_check_mode=True)
if module._name == 'ec2_vpc_route_table_facts':
module.deprecate("The 'ec2_vpc_route_table_facts' module has been renamed to 'ec2_vpc_route_table_info'", version='2.13')
if not HAS_BOTO: if not HAS_BOTO:
module.fail_json(msg='boto required for this module') module.fail_json(msg='boto required for this module')

View file

@ -20,10 +20,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_subnet_facts module: ec2_vpc_subnet_info
short_description: Gather facts about ec2 VPC subnets in AWS short_description: Gather information about ec2 VPC subnets in AWS
description: description:
- Gather facts about ec2 VPC subnets in AWS - Gather information about ec2 VPC subnets in AWS
- This module was called C(ec2_vpc_subnet_facts) before Ansible 2.9. The usage did not change.
version_added: "2.1" version_added: "2.1"
author: "Rob White (@wimnat)" author: "Rob White (@wimnat)"
requirements: requirements:
@ -32,7 +33,7 @@ requirements:
options: options:
subnet_ids: subnet_ids:
description: description:
- A list of subnet IDs to gather facts for. - A list of subnet IDs to gather information for.
version_added: "2.5" version_added: "2.5"
aliases: [subnet_id] aliases: [subnet_id]
filters: filters:
@ -47,28 +48,28 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details. # Note: These examples do not set authentication details, see the AWS Guide for details.
# Gather facts about all VPC subnets # Gather information about all VPC subnets
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
# Gather facts about a particular VPC subnet using ID # Gather information about a particular VPC subnet using ID
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
subnet_ids: subnet-00112233 subnet_ids: subnet-00112233
# Gather facts about any VPC subnet with a tag key Name and value Example # Gather information about any VPC subnet with a tag key Name and value Example
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
filters: filters:
"tag:Name": Example "tag:Name": Example
# Gather facts about any VPC subnet within VPC with ID vpc-abcdef00 # Gather information about any VPC subnet within VPC with ID vpc-abcdef00
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
filters: filters:
vpc-id: vpc-abcdef00 vpc-id: vpc-abcdef00
# Gather facts about a set of VPC subnets, publicA, publicB and publicC within a # Gather information about a set of VPC subnets, publicA, publicB and publicC within a
# VPC with ID vpc-abcdef00 and then use the jinja map function to return the # VPC with ID vpc-abcdef00 and then use the jinja map function to return the
# subnet_ids as a list. # subnet_ids as a list.
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
filters: filters:
vpc-id: vpc-abcdef00 vpc-id: vpc-abcdef00
"tag:Name": "{{ item }}" "tag:Name": "{{ item }}"
@ -76,10 +77,10 @@ EXAMPLES = '''
- publicA - publicA
- publicB - publicB
- publicC - publicC
register: subnet_facts register: subnet_info
- set_fact: - set_fact:
subnet_ids: "{{ subnet_facts.subnets|map(attribute='id')|list }}" subnet_ids: "{{ subnet_info.subnets|map(attribute='id')|list }}"
''' '''
RETURN = ''' RETURN = '''
@ -182,7 +183,7 @@ def describe_subnets_with_backoff(connection, subnet_ids, filters):
Describe Subnets with AWSRetry backoff throttling support. Describe Subnets with AWSRetry backoff throttling support.
connection : boto3 client connection object connection : boto3 client connection object
subnet_ids : list of subnet ids for which to gather facts subnet_ids : list of subnet ids for which to gather information
filters : additional filters to apply to request filters : additional filters to apply to request
""" """
return connection.describe_subnets(SubnetIds=subnet_ids, Filters=filters) return connection.describe_subnets(SubnetIds=subnet_ids, Filters=filters)
@ -231,6 +232,8 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, module = AnsibleModule(argument_spec=argument_spec,
supports_check_mode=True) supports_check_mode=True)
if module._name == 'ec2_vpc_subnet_facts':
module.deprecate("The 'ec2_vpc_subnet_facts' module has been renamed to 'ec2_vpc_subnet_info'", version='2.13')
if not HAS_BOTO3: if not HAS_BOTO3:
module.fail_json(msg='boto3 is required for this module') module.fail_json(msg='boto3 is required for this module')

View file

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_vgw_facts module: ec2_vpc_vgw_info
short_description: Gather facts about virtual gateways in AWS short_description: Gather information about virtual gateways in AWS
description: description:
- Gather facts about virtual gateways in AWS. - Gather information about virtual gateways in AWS.
- This module was called C(ec2_vpc_vgw_facts) before Ansible 2.9. The usage did not change.
version_added: "2.3" version_added: "2.3"
requirements: [ boto3 ] requirements: [ boto3 ]
options: options:
@ -36,26 +37,26 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# # Note: These examples do not set authentication details, see the AWS Guide for details. # # Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Gather facts about all virtual gateways for an account or profile - name: Gather information about all virtual gateways for an account or profile
ec2_vpc_vgw_facts: ec2_vpc_vgw_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
register: vgw_facts register: vgw_info
- name: Gather facts about a filtered list of Virtual Gateways - name: Gather information about a filtered list of Virtual Gateways
ec2_vpc_vgw_facts: ec2_vpc_vgw_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
filters: filters:
"tag:Name": "main-virt-gateway" "tag:Name": "main-virt-gateway"
register: vgw_facts register: vgw_info
- name: Gather facts about a specific virtual gateway by VpnGatewayIds - name: Gather information about a specific virtual gateway by VpnGatewayIds
ec2_vpc_vgw_facts: ec2_vpc_vgw_info:
region: ap-southeast-2 region: ap-southeast-2
profile: production profile: production
vpn_gateway_ids: vgw-c432f6a7 vpn_gateway_ids: vgw-c432f6a7
register: vgw_facts register: vgw_info
''' '''
RETURN = ''' RETURN = '''
@ -138,6 +139,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'ec2_vpc_vgw_facts':
module.deprecate("The 'ec2_vpc_vgw_facts' module has been renamed to 'ec2_vpc_vgw_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not HAS_BOTO3: if not HAS_BOTO3:

View file

@ -10,10 +10,11 @@ ANSIBLE_METADATA = {'status': ['preview'],
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: ec2_vpc_vpn_facts module: ec2_vpc_vpn_info
short_description: Gather facts about VPN Connections in AWS. short_description: Gather information about VPN Connections in AWS.
description: description:
- Gather facts about VPN Connections in AWS. - Gather information about VPN Connections in AWS.
- This module was called C(ec2_vpc_vpn_facts) before Ansible 2.9. The usage did not change.
version_added: "2.6" version_added: "2.6"
requirements: [ boto3 ] requirements: [ boto3 ]
author: Madhura Naniwadekar (@Madhura-CSI) author: Madhura Naniwadekar (@Madhura-CSI)
@ -34,20 +35,20 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# # Note: These examples do not set authentication details, see the AWS Guide for details. # # Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Gather facts about all vpn connections - name: Gather information about all vpn connections
ec2_vpc_vpn_facts: ec2_vpc_vpn_info:
- name: Gather facts about a filtered list of vpn connections, based on tags - name: Gather information about a filtered list of vpn connections, based on tags
ec2_vpc_vpn_facts: ec2_vpc_vpn_info:
filters: filters:
"tag:Name": test-connection "tag:Name": test-connection
register: vpn_conn_facts register: vpn_conn_info
- name: Gather facts about vpn connections by specifying connection IDs. - name: Gather information about vpn connections by specifying connection IDs.
ec2_vpc_vpn_facts: ec2_vpc_vpn_info:
filters: filters:
vpn-gateway-id: vgw-cbe66beb vpn-gateway-id: vgw-cbe66beb
register: vpn_conn_facts register: vpn_conn_info
''' '''
RETURN = ''' RETURN = '''
@ -198,6 +199,8 @@ def main():
module = AnsibleAWSModule(argument_spec=argument_spec, module = AnsibleAWSModule(argument_spec=argument_spec,
mutually_exclusive=[['vpn_connection_ids', 'filters']], mutually_exclusive=[['vpn_connection_ids', 'filters']],
supports_check_mode=True) supports_check_mode=True)
if module._module._name == 'ec2_vpc_vpn_facts':
module._module.deprecate("The 'ec2_vpc_vpn_facts' module has been renamed to 'ec2_vpc_vpn_info'", version='2.13')
connection = module.client('ec2') connection = module.client('ec2')

View file

@ -42,7 +42,7 @@
public: "False" public: "False"
register: subnets register: subnets
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
filters: filters:
vpc-id: "{{ vpc.vpc.id }}" vpc-id: "{{ vpc.vpc.id }}"
<<: *aws_connection_info <<: *aws_connection_info
@ -579,7 +579,7 @@
register: nat_gateway register: nat_gateway
- name: show route table facts - name: show route table facts
ec2_vpc_route_table_facts: ec2_vpc_route_table_info:
filters: filters:
route-table-id: "{{ create_private_table.route_table.id }}" route-table-id: "{{ create_private_table.route_table.id }}"
<<: *aws_connection_info <<: *aws_connection_info
@ -593,7 +593,7 @@
register: nat_gateway register: nat_gateway
- name: show route table facts - name: show route table facts
ec2_vpc_route_table_facts: ec2_vpc_route_table_info:
filters: filters:
route-table-id: "{{ create_private_table.route_table.id }}" route-table-id: "{{ create_private_table.route_table.id }}"
<<: *aws_connection_info <<: *aws_connection_info
@ -641,8 +641,8 @@
<<: *aws_connection_info <<: *aws_connection_info
register: result register: result
- name: Get endpoint facts to verify that it wasn't purged from the route table - name: Get endpoint infos to verify that it wasn't purged from the route table
ec2_vpc_endpoint_facts: ec2_vpc_endpoint_info:
query: endpoints query: endpoints
vpc_endpoint_ids: vpc_endpoint_ids:
- "{{ vpc_endpoint.result.vpc_endpoint_id }}" - "{{ vpc_endpoint.result.vpc_endpoint_id }}"

View file

@ -49,7 +49,7 @@
# ============================================================ # ============================================================
- name: test success with no parameters - name: test success with no parameters
ec2_vpc_vpn_facts: ec2_vpc_vpn_info:
<<: *aws_connection_info <<: *aws_connection_info
register: result register: result
@ -60,7 +60,7 @@
- 'result.vpn_connections != []' - 'result.vpn_connections != []'
- name: test success with customer gateway id as a filter - name: test success with customer gateway id as a filter
ec2_vpc_vpn_facts: ec2_vpc_vpn_info:
filters: filters:
customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}'
vpn-connection-id: '{{ vpn.vpn_connection_id }}' vpn-connection-id: '{{ vpn.vpn_connection_id }}'

View file

@ -51,7 +51,7 @@
public: "False" public: "False"
register: subnets register: subnets
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
filters: filters:
vpc-id: "{{ vpc.vpc.id }}" vpc-id: "{{ vpc.vpc.id }}"
<<: *aws_connection_info <<: *aws_connection_info

View file

@ -51,7 +51,7 @@
public: False public: False
register: subnets register: subnets
- ec2_vpc_subnet_facts: - ec2_vpc_subnet_info:
filters: filters:
vpc-id: "{{ vpc.vpc.id }}" vpc-id: "{{ vpc.vpc.id }}"
<<: *aws_connection_info <<: *aws_connection_info

View file

@ -35,7 +35,7 @@ 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 E322
lib/ansible/modules/cloud/amazon/ec2_vol.py E324 lib/ansible/modules/cloud/amazon/ec2_vol.py E324
lib/ansible/modules/cloud/amazon/ec2_vol.py E326 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_info.py E322
lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py E324 lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py E324
lib/ansible/modules/cloud/amazon/ec2_vpc_subnet.py E317 lib/ansible/modules/cloud/amazon/ec2_vpc_subnet.py E317
lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E323 lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E323