mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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:
parent
598a058afe
commit
13f73adef5
33 changed files with 200 additions and 133 deletions
10
.github/BOTMETA.yml
vendored
10
.github/BOTMETA.yml
vendored
|
@ -71,13 +71,13 @@ files:
|
|||
$modules/cloud/amazon/ec2_tag.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_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_facts.py: willthames
|
||||
$modules/cloud/amazon/ec2_vpc_nat_gateway_facts.py: willthames
|
||||
$modules/cloud/amazon/ec2_vpc_igw_info.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_facts.py: whiter
|
||||
$modules/cloud/amazon/ec2_vpc_peering_facts.py: willthames
|
||||
$modules/cloud/amazon/ec2_vpc_net_info.py: whiter
|
||||
$modules/cloud/amazon/ec2_vpc_peering_info.py: willthames
|
||||
$modules/cloud/amazon/ec2_vpc_subnet.py: willthames
|
||||
$modules/cloud/amazon/ecs_cluster.py: willthames
|
||||
$modules/cloud/amazon/ecs_ecr.py: willthames
|
||||
|
|
12
changelogs/fragments/57651-aws-facts-info.yaml
Normal file
12
changelogs/fragments/57651-aws-facts-info.yaml
Normal 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``.
|
|
@ -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_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_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 ``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>`.
|
||||
|
|
|
@ -72,7 +72,7 @@ Setting a default AWS region for specific EC2-related modules::
|
|||
region: '{{ my_region }}'
|
||||
ec2_instance_info:
|
||||
region: '{{ my_region }}'
|
||||
ec2_vpc_net_facts:
|
||||
ec2_vpc_net_info:
|
||||
region: '{{ my_region }}'
|
||||
|
||||
.. _module_defaults_groups:
|
||||
|
|
|
@ -180,49 +180,49 @@ groupings:
|
|||
- aws
|
||||
ec2_vpc_dhcp_option:
|
||||
- aws
|
||||
ec2_vpc_dhcp_option_facts:
|
||||
ec2_vpc_dhcp_option_info:
|
||||
- aws
|
||||
ec2_vpc_egress_igw:
|
||||
- aws
|
||||
ec2_vpc_endpoint:
|
||||
- aws
|
||||
ec2_vpc_endpoint_facts:
|
||||
ec2_vpc_endpoint_info:
|
||||
- aws
|
||||
ec2_vpc_igw:
|
||||
- aws
|
||||
ec2_vpc_igw_facts:
|
||||
ec2_vpc_igw_info:
|
||||
- aws
|
||||
ec2_vpc_nacl:
|
||||
- aws
|
||||
ec2_vpc_nacl_facts:
|
||||
ec2_vpc_nacl_info:
|
||||
- aws
|
||||
ec2_vpc_nat_gateway:
|
||||
- aws
|
||||
ec2_vpc_nat_gateway_facts:
|
||||
ec2_vpc_nat_gateway_info:
|
||||
- aws
|
||||
ec2_vpc_net:
|
||||
- aws
|
||||
ec2_vpc_net_facts:
|
||||
ec2_vpc_net_info:
|
||||
- aws
|
||||
ec2_vpc_peer:
|
||||
- aws
|
||||
ec2_vpc_peering_facts:
|
||||
ec2_vpc_peering_info:
|
||||
- aws
|
||||
ec2_vpc_route_table:
|
||||
- aws
|
||||
ec2_vpc_route_table_facts:
|
||||
ec2_vpc_route_table_info:
|
||||
- aws
|
||||
ec2_vpc_subnet:
|
||||
- aws
|
||||
ec2_vpc_subnet_facts:
|
||||
ec2_vpc_subnet_info:
|
||||
- aws
|
||||
ec2_vpc_vgw:
|
||||
- aws
|
||||
ec2_vpc_vgw_facts:
|
||||
ec2_vpc_vgw_info:
|
||||
- aws
|
||||
ec2_vpc_vpn:
|
||||
- aws
|
||||
ec2_vpc_vpn_facts:
|
||||
ec2_vpc_vpn_info:
|
||||
- aws
|
||||
ec2_win_password:
|
||||
- aws
|
||||
|
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_dhcp_option_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_dhcp_option_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_dhcp_option_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_endpoint_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_endpoint_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_endpoint_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_igw_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_igw_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_igw_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_nacl_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_nacl_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_nacl_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_nat_gateway_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_nat_gateway_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_nat_gateway_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_net_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_net_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_net_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_peering_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_peering_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_peering_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_route_table_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_route_table_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_route_table_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_subnet_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_subnet_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_subnet_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_vgw_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_vgw_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_vgw_info.py
|
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_vpn_facts.py
Symbolic link
1
lib/ansible/modules/cloud/amazon/_ec2_vpc_vpn_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
ec2_vpc_vpn_info.py
|
|
@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_dhcp_option_facts
|
||||
short_description: Gather facts about dhcp options sets in AWS
|
||||
module: ec2_vpc_dhcp_option_info
|
||||
short_description: Gather information about dhcp options sets in AWS
|
||||
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"
|
||||
requirements: [ boto3 ]
|
||||
author: "Nick Aslanidis (@naslanidis)"
|
||||
|
@ -38,26 +39,26 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# # 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
|
||||
ec2_vpc_dhcp_option_facts:
|
||||
- name: Gather information about all DHCP Option sets for an account or profile
|
||||
ec2_vpc_dhcp_option_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
register: dhcp_facts
|
||||
register: dhcp_info
|
||||
|
||||
- name: Gather facts about a filtered list of DHCP Option sets
|
||||
ec2_vpc_dhcp_option_facts:
|
||||
- name: Gather information about a filtered list of DHCP Option sets
|
||||
ec2_vpc_dhcp_option_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
filters:
|
||||
"tag:Name": "abc-123"
|
||||
register: dhcp_facts
|
||||
register: dhcp_info
|
||||
|
||||
- name: Gather facts about a specific DHCP Option set by DhcpOptionId
|
||||
ec2_vpc_dhcp_option_facts:
|
||||
- name: Gather information about a specific DHCP Option set by DhcpOptionId
|
||||
ec2_vpc_dhcp_option_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
DhcpOptionsIds: dopt-123fece2
|
||||
register: dhcp_facts
|
||||
register: dhcp_info
|
||||
|
||||
'''
|
||||
|
||||
|
@ -124,6 +125,8 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
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
|
||||
if not HAS_BOTO3:
|
|
@ -27,7 +27,7 @@ options:
|
|||
required: false
|
||||
service:
|
||||
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.
|
||||
- Required when creating an endpoint.
|
||||
required: false
|
||||
|
|
|
@ -10,10 +10,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
'supported_by': 'community'}
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: ec2_vpc_endpoint_facts
|
||||
module: ec2_vpc_endpoint_info
|
||||
short_description: Retrieves AWS VPC endpoints details using AWS methods.
|
||||
description:
|
||||
- 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"
|
||||
requirements: [ boto3 ]
|
||||
options:
|
||||
|
@ -43,19 +44,19 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# Simple example of listing all support AWS services for VPC endpoints
|
||||
- name: List supported AWS endpoint services
|
||||
ec2_vpc_endpoint_facts:
|
||||
ec2_vpc_endpoint_info:
|
||||
query: services
|
||||
region: ap-southeast-2
|
||||
register: supported_endpoint_services
|
||||
|
||||
- name: Get all endpoints in ap-southeast-2 region
|
||||
ec2_vpc_endpoint_facts:
|
||||
ec2_vpc_endpoint_info:
|
||||
query: endpoints
|
||||
region: ap-southeast-2
|
||||
register: existing_endpoints
|
||||
|
||||
- name: Get all endpoints with specific filters
|
||||
ec2_vpc_endpoint_facts:
|
||||
ec2_vpc_endpoint_info:
|
||||
query: endpoints
|
||||
region: ap-southeast-2
|
||||
filters:
|
||||
|
@ -68,7 +69,7 @@ EXAMPLES = '''
|
|||
register: existing_endpoints
|
||||
|
||||
- name: Get details on specific endpoint
|
||||
ec2_vpc_endpoint_facts:
|
||||
ec2_vpc_endpoint_info:
|
||||
query: endpoints
|
||||
region: ap-southeast-2
|
||||
vpc_endpoint_ids:
|
||||
|
@ -167,6 +168,8 @@ def main():
|
|||
)
|
||||
|
||||
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
|
||||
if not HAS_BOTO3:
|
|
@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_igw_facts
|
||||
short_description: Gather facts about internet gateways in AWS
|
||||
module: ec2_vpc_igw_info
|
||||
short_description: Gather information about internet gateways in AWS
|
||||
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"
|
||||
requirements: [ boto3 ]
|
||||
author: "Nick Aslanidis (@naslanidis)"
|
||||
|
@ -36,26 +37,26 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# # 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
|
||||
ec2_vpc_igw_facts:
|
||||
- name: Gather information about all Internet Gateways for an account or profile
|
||||
ec2_vpc_igw_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
register: igw_facts
|
||||
register: igw_info
|
||||
|
||||
- name: Gather facts about a filtered list of Internet Gateways
|
||||
ec2_vpc_igw_facts:
|
||||
- name: Gather information about a filtered list of Internet Gateways
|
||||
ec2_vpc_igw_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
filters:
|
||||
"tag:Name": "igw-123"
|
||||
register: igw_facts
|
||||
register: igw_info
|
||||
|
||||
- name: Gather facts about a specific internet gateway by InternetGatewayId
|
||||
ec2_vpc_igw_facts:
|
||||
- name: Gather information about a specific internet gateway by InternetGatewayId
|
||||
ec2_vpc_igw_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
internet_gateway_ids: igw-c1231234
|
||||
register: igw_facts
|
||||
register: igw_info
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -132,6 +133,8 @@ def main():
|
|||
)
|
||||
|
||||
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
|
||||
if not HAS_BOTO3:
|
|
@ -12,17 +12,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_nacl_facts
|
||||
short_description: Gather facts about Network ACLs in an AWS VPC
|
||||
module: ec2_vpc_nacl_info
|
||||
short_description: Gather information about Network ACLs in an AWS VPC
|
||||
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"
|
||||
author: "Brad Davidson (@brandond)"
|
||||
requirements: [ boto3 ]
|
||||
options:
|
||||
nacl_ids:
|
||||
description:
|
||||
- A list of Network ACL IDs to retrieve facts about.
|
||||
- A list of Network ACL IDs to retrieve information about.
|
||||
required: false
|
||||
default: []
|
||||
aliases: [nacl_id]
|
||||
|
@ -44,16 +45,16 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# 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
|
||||
register: all_nacls
|
||||
ec2_vpc_nacl_facts:
|
||||
ec2_vpc_nacl_info:
|
||||
region: us-west-2
|
||||
|
||||
# Retrieve default Network ACLs:
|
||||
- name: Get Default NACLs
|
||||
register: default_nacls
|
||||
ec2_vpc_nacl_facts:
|
||||
ec2_vpc_nacl_info:
|
||||
region: us-west-2
|
||||
filters:
|
||||
'default': 'true'
|
||||
|
@ -211,6 +212,8 @@ def main():
|
|||
)
|
||||
|
||||
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:
|
||||
module.fail_json(msg='boto3 required for this module')
|
|
@ -12,10 +12,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
|
||||
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.
|
||||
description:
|
||||
- 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"
|
||||
requirements: [ boto3 ]
|
||||
options:
|
||||
|
@ -36,7 +37,7 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# Simple example of listing all nat gateways
|
||||
- name: List all managed nat gateways in ap-southeast-2
|
||||
ec2_vpc_nat_gateway_facts:
|
||||
ec2_vpc_nat_gateway_info:
|
||||
region: ap-southeast-2
|
||||
register: all_ngws
|
||||
|
||||
|
@ -45,7 +46,7 @@ EXAMPLES = '''
|
|||
msg: "{{ all_ngws.result }}"
|
||||
|
||||
- name: Get details on specific nat gateways
|
||||
ec2_vpc_nat_gateway_facts:
|
||||
ec2_vpc_nat_gateway_info:
|
||||
nat_gateway_ids:
|
||||
- nat-1234567891234567
|
||||
- nat-7654321987654321
|
||||
|
@ -53,14 +54,14 @@ EXAMPLES = '''
|
|||
register: specific_ngws
|
||||
|
||||
- name: Get all nat gateways with specific filters
|
||||
ec2_vpc_nat_gateway_facts:
|
||||
ec2_vpc_nat_gateway_info:
|
||||
region: ap-southeast-2
|
||||
filters:
|
||||
state: ['pending']
|
||||
register: pending_ngws
|
||||
|
||||
- name: Get nat gateways with specific filter
|
||||
ec2_vpc_nat_gateway_facts:
|
||||
ec2_vpc_nat_gateway_info:
|
||||
region: ap-southeast-2
|
||||
filters:
|
||||
subnet-id: subnet-12345678
|
||||
|
@ -127,6 +128,8 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
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
|
||||
if not HAS_BOTO3:
|
|
@ -20,10 +20,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_net_facts
|
||||
short_description: Gather facts about ec2 VPCs in AWS
|
||||
module: ec2_vpc_net_info
|
||||
short_description: Gather information about ec2 VPCs in AWS
|
||||
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"
|
||||
author: "Rob White (@wimnat)"
|
||||
requirements:
|
||||
|
@ -46,15 +47,15 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# Note: These examples do not set authentication details, see the AWS Guide for details.
|
||||
|
||||
# Gather facts about all VPCs
|
||||
- ec2_vpc_net_facts:
|
||||
# Gather information about all VPCs
|
||||
- ec2_vpc_net_info:
|
||||
|
||||
# Gather facts about a particular VPC using VPC ID
|
||||
- ec2_vpc_net_facts:
|
||||
# Gather information about a particular VPC using VPC ID
|
||||
- ec2_vpc_net_info:
|
||||
vpc_ids: vpc-00112233
|
||||
|
||||
# Gather facts about any VPC with a tag key Name and value Example
|
||||
- ec2_vpc_net_facts:
|
||||
# Gather information about any VPC with a tag key Name and value Example
|
||||
- ec2_vpc_net_info:
|
||||
filters:
|
||||
"tag:Name": Example
|
||||
|
||||
|
@ -272,6 +273,8 @@ def main():
|
|||
))
|
||||
|
||||
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:
|
||||
module.fail_json(msg='boto3 and botocore are required for this module')
|
|
@ -11,10 +11,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
'supported_by': 'community'}
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: ec2_vpc_peering_facts
|
||||
module: ec2_vpc_peering_info
|
||||
short_description: Retrieves AWS VPC Peering details using AWS methods.
|
||||
description:
|
||||
- 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"
|
||||
requirements: [ boto3 ]
|
||||
options:
|
||||
|
@ -35,7 +36,7 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# Simple example of listing all VPC Peers
|
||||
- name: List all vpc peers
|
||||
ec2_vpc_peering_facts:
|
||||
ec2_vpc_peering_info:
|
||||
region: ap-southeast-2
|
||||
register: all_vpc_peers
|
||||
|
||||
|
@ -44,7 +45,7 @@ EXAMPLES = '''
|
|||
msg: "{{ all_vpc_peers.result }}"
|
||||
|
||||
- name: Get details on specific VPC peer
|
||||
ec2_vpc_peering_facts:
|
||||
ec2_vpc_peering_info:
|
||||
peer_connection_ids:
|
||||
- pcx-12345678
|
||||
- pcx-87654321
|
||||
|
@ -52,7 +53,7 @@ EXAMPLES = '''
|
|||
register: all_vpc_peers
|
||||
|
||||
- name: Get all vpc peers with specific filters
|
||||
ec2_vpc_peering_facts:
|
||||
ec2_vpc_peering_info:
|
||||
region: ap-southeast-2
|
||||
filters:
|
||||
status-code: ['pending-acceptance']
|
||||
|
@ -107,6 +108,8 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
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
|
||||
if not HAS_BOTO3:
|
|
@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_route_table_facts
|
||||
short_description: Gather facts about ec2 VPC route tables in AWS
|
||||
module: ec2_vpc_route_table_info
|
||||
short_description: Gather information about ec2 VPC route tables in AWS
|
||||
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"
|
||||
author: "Rob White (@wimnat)"
|
||||
options:
|
||||
|
@ -32,21 +33,21 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# Note: These examples do not set authentication details, see the AWS Guide for details.
|
||||
|
||||
# Gather facts about all VPC route tables
|
||||
- ec2_vpc_route_table_facts:
|
||||
# Gather information about all VPC route tables
|
||||
- ec2_vpc_route_table_info:
|
||||
|
||||
# Gather facts about a particular VPC route table using route table ID
|
||||
- ec2_vpc_route_table_facts:
|
||||
# Gather information about a particular VPC route table using route table ID
|
||||
- ec2_vpc_route_table_info:
|
||||
filters:
|
||||
route-table-id: rtb-00112233
|
||||
|
||||
# Gather facts about any VPC route table with a tag key Name and value Example
|
||||
- ec2_vpc_route_table_facts:
|
||||
# Gather information about any VPC route table with a tag key Name and value Example
|
||||
- ec2_vpc_route_table_info:
|
||||
filters:
|
||||
"tag:Name": Example
|
||||
|
||||
# Gather facts about any VPC route table within VPC with ID vpc-abcdef00
|
||||
- ec2_vpc_route_table_facts:
|
||||
# Gather information about any VPC route table within VPC with ID vpc-abcdef00
|
||||
- ec2_vpc_route_table_info:
|
||||
filters:
|
||||
vpc-id: vpc-abcdef00
|
||||
|
||||
|
@ -109,6 +110,8 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
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:
|
||||
module.fail_json(msg='boto required for this module')
|
|
@ -20,10 +20,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_subnet_facts
|
||||
short_description: Gather facts about ec2 VPC subnets in AWS
|
||||
module: ec2_vpc_subnet_info
|
||||
short_description: Gather information about ec2 VPC subnets in AWS
|
||||
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"
|
||||
author: "Rob White (@wimnat)"
|
||||
requirements:
|
||||
|
@ -32,7 +33,7 @@ requirements:
|
|||
options:
|
||||
subnet_ids:
|
||||
description:
|
||||
- A list of subnet IDs to gather facts for.
|
||||
- A list of subnet IDs to gather information for.
|
||||
version_added: "2.5"
|
||||
aliases: [subnet_id]
|
||||
filters:
|
||||
|
@ -47,28 +48,28 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# Note: These examples do not set authentication details, see the AWS Guide for details.
|
||||
|
||||
# Gather facts about all VPC subnets
|
||||
- ec2_vpc_subnet_facts:
|
||||
# Gather information about all VPC subnets
|
||||
- ec2_vpc_subnet_info:
|
||||
|
||||
# Gather facts about a particular VPC subnet using ID
|
||||
- ec2_vpc_subnet_facts:
|
||||
# Gather information about a particular VPC subnet using ID
|
||||
- ec2_vpc_subnet_info:
|
||||
subnet_ids: subnet-00112233
|
||||
|
||||
# Gather facts about any VPC subnet with a tag key Name and value Example
|
||||
- ec2_vpc_subnet_facts:
|
||||
# Gather information about any VPC subnet with a tag key Name and value Example
|
||||
- ec2_vpc_subnet_info:
|
||||
filters:
|
||||
"tag:Name": Example
|
||||
|
||||
# Gather facts about any VPC subnet within VPC with ID vpc-abcdef00
|
||||
- ec2_vpc_subnet_facts:
|
||||
# Gather information about any VPC subnet within VPC with ID vpc-abcdef00
|
||||
- ec2_vpc_subnet_info:
|
||||
filters:
|
||||
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
|
||||
# subnet_ids as a list.
|
||||
|
||||
- ec2_vpc_subnet_facts:
|
||||
- ec2_vpc_subnet_info:
|
||||
filters:
|
||||
vpc-id: vpc-abcdef00
|
||||
"tag:Name": "{{ item }}"
|
||||
|
@ -76,10 +77,10 @@ EXAMPLES = '''
|
|||
- publicA
|
||||
- publicB
|
||||
- publicC
|
||||
register: subnet_facts
|
||||
register: subnet_info
|
||||
|
||||
- set_fact:
|
||||
subnet_ids: "{{ subnet_facts.subnets|map(attribute='id')|list }}"
|
||||
subnet_ids: "{{ subnet_info.subnets|map(attribute='id')|list }}"
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -182,7 +183,7 @@ def describe_subnets_with_backoff(connection, subnet_ids, filters):
|
|||
Describe Subnets with AWSRetry backoff throttling support.
|
||||
|
||||
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
|
||||
"""
|
||||
return connection.describe_subnets(SubnetIds=subnet_ids, Filters=filters)
|
||||
|
@ -231,6 +232,8 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
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:
|
||||
module.fail_json(msg='boto3 is required for this module')
|
|
@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_vgw_facts
|
||||
short_description: Gather facts about virtual gateways in AWS
|
||||
module: ec2_vpc_vgw_info
|
||||
short_description: Gather information about virtual gateways in AWS
|
||||
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"
|
||||
requirements: [ boto3 ]
|
||||
options:
|
||||
|
@ -36,26 +37,26 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# # 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
|
||||
ec2_vpc_vgw_facts:
|
||||
- name: Gather information about all virtual gateways for an account or profile
|
||||
ec2_vpc_vgw_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
register: vgw_facts
|
||||
register: vgw_info
|
||||
|
||||
- name: Gather facts about a filtered list of Virtual Gateways
|
||||
ec2_vpc_vgw_facts:
|
||||
- name: Gather information about a filtered list of Virtual Gateways
|
||||
ec2_vpc_vgw_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
filters:
|
||||
"tag:Name": "main-virt-gateway"
|
||||
register: vgw_facts
|
||||
register: vgw_info
|
||||
|
||||
- name: Gather facts about a specific virtual gateway by VpnGatewayIds
|
||||
ec2_vpc_vgw_facts:
|
||||
- name: Gather information about a specific virtual gateway by VpnGatewayIds
|
||||
ec2_vpc_vgw_info:
|
||||
region: ap-southeast-2
|
||||
profile: production
|
||||
vpn_gateway_ids: vgw-c432f6a7
|
||||
register: vgw_facts
|
||||
register: vgw_info
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -138,6 +139,8 @@ def main():
|
|||
)
|
||||
|
||||
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
|
||||
if not HAS_BOTO3:
|
|
@ -10,10 +10,11 @@ ANSIBLE_METADATA = {'status': ['preview'],
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: ec2_vpc_vpn_facts
|
||||
short_description: Gather facts about VPN Connections in AWS.
|
||||
module: ec2_vpc_vpn_info
|
||||
short_description: Gather information about VPN Connections in AWS.
|
||||
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"
|
||||
requirements: [ boto3 ]
|
||||
author: Madhura Naniwadekar (@Madhura-CSI)
|
||||
|
@ -34,20 +35,20 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = '''
|
||||
# # Note: These examples do not set authentication details, see the AWS Guide for details.
|
||||
- name: Gather facts about all vpn connections
|
||||
ec2_vpc_vpn_facts:
|
||||
- name: Gather information about all vpn connections
|
||||
ec2_vpc_vpn_info:
|
||||
|
||||
- name: Gather facts about a filtered list of vpn connections, based on tags
|
||||
ec2_vpc_vpn_facts:
|
||||
- name: Gather information about a filtered list of vpn connections, based on tags
|
||||
ec2_vpc_vpn_info:
|
||||
filters:
|
||||
"tag:Name": test-connection
|
||||
register: vpn_conn_facts
|
||||
register: vpn_conn_info
|
||||
|
||||
- name: Gather facts about vpn connections by specifying connection IDs.
|
||||
ec2_vpc_vpn_facts:
|
||||
- name: Gather information about vpn connections by specifying connection IDs.
|
||||
ec2_vpc_vpn_info:
|
||||
filters:
|
||||
vpn-gateway-id: vgw-cbe66beb
|
||||
register: vpn_conn_facts
|
||||
register: vpn_conn_info
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -198,6 +199,8 @@ def main():
|
|||
module = AnsibleAWSModule(argument_spec=argument_spec,
|
||||
mutually_exclusive=[['vpn_connection_ids', 'filters']],
|
||||
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')
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
public: "False"
|
||||
register: subnets
|
||||
|
||||
- ec2_vpc_subnet_facts:
|
||||
- ec2_vpc_subnet_info:
|
||||
filters:
|
||||
vpc-id: "{{ vpc.vpc.id }}"
|
||||
<<: *aws_connection_info
|
||||
|
@ -579,7 +579,7 @@
|
|||
register: nat_gateway
|
||||
|
||||
- name: show route table facts
|
||||
ec2_vpc_route_table_facts:
|
||||
ec2_vpc_route_table_info:
|
||||
filters:
|
||||
route-table-id: "{{ create_private_table.route_table.id }}"
|
||||
<<: *aws_connection_info
|
||||
|
@ -593,7 +593,7 @@
|
|||
register: nat_gateway
|
||||
|
||||
- name: show route table facts
|
||||
ec2_vpc_route_table_facts:
|
||||
ec2_vpc_route_table_info:
|
||||
filters:
|
||||
route-table-id: "{{ create_private_table.route_table.id }}"
|
||||
<<: *aws_connection_info
|
||||
|
@ -641,8 +641,8 @@
|
|||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
- name: Get endpoint facts to verify that it wasn't purged from the route table
|
||||
ec2_vpc_endpoint_facts:
|
||||
- name: Get endpoint infos to verify that it wasn't purged from the route table
|
||||
ec2_vpc_endpoint_info:
|
||||
query: endpoints
|
||||
vpc_endpoint_ids:
|
||||
- "{{ vpc_endpoint.result.vpc_endpoint_id }}"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
# ============================================================
|
||||
- name: test success with no parameters
|
||||
ec2_vpc_vpn_facts:
|
||||
ec2_vpc_vpn_info:
|
||||
<<: *aws_connection_info
|
||||
register: result
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
- 'result.vpn_connections != []'
|
||||
|
||||
- name: test success with customer gateway id as a filter
|
||||
ec2_vpc_vpn_facts:
|
||||
ec2_vpc_vpn_info:
|
||||
filters:
|
||||
customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}'
|
||||
vpn-connection-id: '{{ vpn.vpn_connection_id }}'
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
public: "False"
|
||||
register: subnets
|
||||
|
||||
- ec2_vpc_subnet_facts:
|
||||
- ec2_vpc_subnet_info:
|
||||
filters:
|
||||
vpc-id: "{{ vpc.vpc.id }}"
|
||||
<<: *aws_connection_info
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
public: False
|
||||
register: subnets
|
||||
|
||||
- ec2_vpc_subnet_facts:
|
||||
- ec2_vpc_subnet_info:
|
||||
filters:
|
||||
vpc-id: "{{ vpc.vpc.id }}"
|
||||
<<: *aws_connection_info
|
||||
|
|
|
@ -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 E324
|
||||
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_subnet.py E317
|
||||
lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py E323
|
||||
|
|
Loading…
Reference in a new issue