AWS: _facts -> _info (part 2) (#57626)

* Rename cloudwatchlogs_log_group_facts -> cloudwatchlogs_log_group_info.

* Rename elasticache_facts -> elasticache_info.

* redshift_facts -> redshift_info.

* Rename route53_facts -> route53_info.

* Rename rds_instance_facts -> rds_instance_info.

* Rename rds_snapshot_facts -> rds_snapshot_info.

* Rename iam_mfa_device_facts -> iam_mfa_device_info.

* Rename iam_role_facts -> iam_role_info.

* Rename iam_server_certificate_facts -> iam_server_certificate_info.

* Rename elb_application_lb_facts -> elb_application_lb_info.

* Renaming elb_classic_lb_facts -> elb_classic_lb_info.

* elb_target_facts -> elb_target_info.

* Rename elb_target_group_facts -> elb_target_group_info.

* Update porting guide.

* Add changelog.

* Fix module defaults (both for this PR and #57613).

* Two fixes.
This commit is contained in:
Felix Fontein 2019-06-10 17:48:07 +02:00 committed by GitHub
parent 3bee49a3bb
commit fc4bbff6e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 244 additions and 164 deletions

2
.github/BOTMETA.yml vendored
View file

@ -87,7 +87,7 @@ files:
$modules/cloud/amazon/ecs_taskdefinition.py: willthames $modules/cloud/amazon/ecs_taskdefinition.py: willthames
$modules/cloud/amazon/ecs_taskdefinition_facts.py: willthames $modules/cloud/amazon/ecs_taskdefinition_facts.py: willthames
$modules/cloud/amazon/elasticache.py: alachaum $modules/cloud/amazon/elasticache.py: alachaum
$modules/cloud/amazon/elb_target_group_facts.py: willthames $modules/cloud/amazon/elb_target_group_info.py: willthames
$modules/cloud/amazon/iam.py: $team_ansible $modules/cloud/amazon/iam.py: $team_ansible
$modules/cloud/amazon/iam_cert.py: $team_ansible $modules/cloud/amazon/iam_cert.py: $team_ansible
$modules/cloud/amazon/iam_group.py: willthames $modules/cloud/amazon/iam_group.py: willthames

View file

@ -0,0 +1,14 @@
minor_changes:
- The ``cloudwatchlogs_log_group_facts`` module has been renamed to ``cloudwatchlogs_log_group_info``.
- The ``elasticache_facts`` module has been renamed to ``elasticache_info``.
- The ``elb_application_lb_facts`` module has been renamed to ``elb_application_lb_info``.
- The ``elb_classic_lb_facts`` module has been renamed to ``elb_classic_lb_info``.
- The ``elb_target_facts`` module has been renamed to ``elb_target_info``.
- The ``elb_target_group_facts`` module has been renamed to ``elb_target_group_info``.
- The ``iam_mfa_device_facts`` module has been renamed to ``iam_mfa_device_info``.
- The ``iam_role_facts`` module has been renamed to ``iam_role_info``.
- The ``iam_server_certificate_facts`` module has been renamed to ``iam_server_certificate_info``.
- The ``rds_instance_facts`` module has been renamed to ``rds_instance_info``.
- The ``rds_snapshot_facts`` module has been renamed to ``rds_snapshot_info``.
- The ``redshift_facts`` module has been renamed to ``redshift_info``.
- The ``route53_facts`` module has been renamed to ``route53_info``.

View file

@ -102,6 +102,19 @@ Noteworthy module changes
* The ``aws_region_facts`` module was renamed to :ref:`aws_region_info <aws_region_info_module>`. * The ``aws_region_facts`` module was renamed to :ref:`aws_region_info <aws_region_info_module>`.
* The ``aws_sgw_facts`` module was renamed to :ref:`aws_sgw_info <aws_sgw_info_module>`. * The ``aws_sgw_facts`` module was renamed to :ref:`aws_sgw_info <aws_sgw_info_module>`.
* The ``aws_waf_facts`` module was renamed to :ref:`aws_waf_info <aws_waf_info_module>`. * The ``aws_waf_facts`` module was renamed to :ref:`aws_waf_info <aws_waf_info_module>`.
* The ``cloudwatchlogs_log_group_facts`` module was renamed to :ref:`cloudwatchlogs_log_group_info <cloudwatchlogs_log_group_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>`.
* The ``elb_target_facts`` module was renamed to :ref:`elb_target_info <elb_target_info_module>`.
* The ``elb_target_group_facts`` module was renamed to :ref:`elb_target_group_info <elb_target_group_info_module>`.
* The ``iam_mfa_device_facts`` module was renamed to :ref:`iam_mfa_device_info <iam_mfa_device_info_module>`.
* The ``iam_role_facts`` module was renamed to :ref:`iam_role_info <iam_role_info_module>`.
* The ``iam_server_certificate_facts`` module was renamed to :ref:`iam_server_certificate_info <iam_server_certificate_info_module>`.
* The ``rds_instance_facts`` module was renamed to :ref:`rds_instance_info <rds_instance_info_module>`.
* The ``rds_snapshot_facts`` module was renamed to :ref:`rds_snapshot_info <rds_snapshot_info_module>`.
* The ``redshift_facts`` module was renamed to :ref:`redshift_info <redshift_info_module>`.
* The ``route53_facts`` module was renamed to :ref:`route53_info <route53_info_module>`.
Plugins Plugins

View file

@ -1,12 +1,12 @@
version: '1.0' version: '1.0'
groupings: groupings:
aws_acm_facts: aws_acm_info:
- aws - aws
aws_api_gateway: aws_api_gateway:
- aws - aws
aws_application_scaling_policy: aws_application_scaling_policy:
- aws - aws
aws_az_facts: aws_az_info:
- aws - aws
aws_batch_compute_environment: aws_batch_compute_environment:
- aws - aws
@ -14,7 +14,7 @@ groupings:
- aws - aws
aws_batch_job_queue: aws_batch_job_queue:
- aws - aws
aws_caller_facts: aws_caller_info:
- aws - aws
aws_config_aggregation_authorization: aws_config_aggregation_authorization:
- aws - aws
@ -46,9 +46,9 @@ groupings:
- aws - aws
aws_kms: aws_kms:
- aws - aws
aws_kms_facts: aws_kms_info:
- aws - aws
aws_region_facts: aws_region_info:
- aws - aws
aws_s3: aws_s3:
- aws - aws
@ -60,13 +60,13 @@ groupings:
- aws - aws
aws_ses_identity_policy: aws_ses_identity_policy:
- aws - aws
aws_sgw_facts: aws_sgw_info:
- aws - aws
aws_ssm_parameter_store: aws_ssm_parameter_store:
- aws - aws
aws_waf_condition: aws_waf_condition:
- aws - aws
aws_waf_facts: aws_waf_info:
- aws - aws
aws_waf_rule: aws_waf_rule:
- aws - aws
@ -90,7 +90,7 @@ groupings:
- aws - aws
cloudwatchlogs_log_group: cloudwatchlogs_log_group:
- aws - aws
cloudwatchlogs_log_group_facts: cloudwatchlogs_log_group_info:
- aws - aws
cpm_plugconfig: cpm_plugconfig:
- cpm - cpm
@ -240,7 +240,7 @@ groupings:
- aws - aws
ecs_taskdefinition: ecs_taskdefinition:
- aws - aws
ecs_taskdefinition_facts: ecs_taskdefinition_info:
- aws - aws
efs: efs:
- aws - aws
@ -248,7 +248,7 @@ groupings:
- aws - aws
elasticache: elasticache:
- aws - aws
elasticache_facts: elasticache_info:
- aws - aws
elasticache_parameter_group: elasticache_parameter_group:
- aws - aws
@ -258,11 +258,11 @@ groupings:
- aws - aws
elb_application_lb: elb_application_lb:
- aws - aws
elb_application_lb_facts: elb_application_lb_info:
- aws - aws
elb_classic_lb: elb_classic_lb:
- aws - aws
elb_classic_lb_facts: elb_classic_lb_info:
- aws - aws
elb_instance: elb_instance:
- aws - aws
@ -272,7 +272,7 @@ groupings:
- aws - aws
elb_target_group: elb_target_group:
- aws - aws
elb_target_group_facts: elb_target_group_info:
- aws - aws
execute_lambda: execute_lambda:
- aws - aws
@ -284,15 +284,15 @@ groupings:
- aws - aws
iam_managed_policy: iam_managed_policy:
- aws - aws
iam_mfa_device_facts: iam_mfa_device_info:
- aws - aws
iam_policy: iam_policy:
- aws - aws
iam_role: iam_role:
- aws - aws
iam_role_facts: iam_role_info:
- aws - aws
iam_server_certificate_facts: iam_server_certificate_info:
- aws - aws
iam_user: iam_user:
- aws - aws
@ -314,23 +314,23 @@ groupings:
- aws - aws
rds_instance: rds_instance:
- aws - aws
rds_instance_facts: rds_instance_info:
- aws - aws
rds_param_group: rds_param_group:
- aws - aws
rds_snapshot_facts: rds_snapshot_info:
- aws - aws
rds_subnet_group: rds_subnet_group:
- aws - aws
redshift: redshift:
- aws - aws
redshift_facts: redshift_info:
- aws - aws
redshift_subnet_group: redshift_subnet_group:
- aws - aws
route53: route53:
- aws - aws
route53_facts: route53_info:
- aws - aws
route53_health_check: route53_health_check:
- aws - aws

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
iam_server_certificate_facts.py iam_server_certificate_info.py

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -12,9 +12,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: cloudwatchlogs_log_group_facts module: cloudwatchlogs_log_group_info
short_description: get facts about log_group in CloudWatchLogs short_description: get information about log_group in CloudWatchLogs
description: Lists the specified log groups. You can list all your log groups or filter the results by prefix. description:
- Lists the specified log groups. You can list all your log groups or filter the results by prefix.
- This module was called C(cloudwatchlogs_log_group_facts) before Ansible 2.9. The usage did not change.
version_added: "2.5" version_added: "2.5"
author: author:
- Willian Ricardo (@willricardo) <willricardo@gmail.com> - Willian Ricardo (@willricardo) <willricardo@gmail.com>
@ -30,7 +32,7 @@ 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.
- cloudwatchlogs_log_group_facts: - cloudwatchlogs_log_group_info:
log_group_name: test-log-group log_group_name: test-log-group
''' '''
@ -103,6 +105,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 == 'cloudwatchlogs_log_group_facts':
module.deprecate("The 'cloudwatchlogs_log_group_facts' module has been renamed to 'cloudwatchlogs_log_group_info'", version='2.13')
if not HAS_BOTO3: if not HAS_BOTO3:
module.fail_json(msg='boto3 is required.') module.fail_json(msg='boto3 is required.')

View file

@ -7,10 +7,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'supported_by': 'community'} 'supported_by': 'community'}
DOCUMENTATION = ''' DOCUMENTATION = '''
module: elasticache_facts module: elasticache_info
short_description: Retrieve facts for AWS Elasticache clusters short_description: Retrieve information for AWS Elasticache clusters
description: description:
- Retrieve facts from AWS Elasticache clusters - Retrieve information from AWS Elasticache clusters
- This module was called C(elasticache_facts) before Ansible 2.9. The usage did not change.
version_added: "2.5" version_added: "2.5"
options: options:
name: name:
@ -25,11 +26,11 @@ extends_documentation_fragment:
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: obtain all Elasticache facts - name: obtain all Elasticache information
elasticache_facts: elasticache_info:
- name: obtain all facts for a single Elasticache cluster - name: obtain all information for a single Elasticache cluster
elasticache_facts: elasticache_info:
name: test_elasticache name: test_elasticache
''' '''
@ -297,6 +298,8 @@ def main():
) )
) )
module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
if module._name == 'elasticache_facts':
module.deprecate("The 'elasticache_facts' module has been renamed to 'elasticache_info'", version='2.13')
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True) region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
client = boto3_conn(module, conn_type='client', resource='elasticache', client = boto3_conn(module, conn_type='client', resource='elasticache',

View file

@ -12,10 +12,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: elb_application_lb_facts module: elb_application_lb_info
short_description: Gather facts about application ELBs in AWS short_description: Gather information about application ELBs in AWS
description: description:
- Gather facts about application ELBs in AWS - Gather information about application ELBs in AWS
- This module was called C(elb_application_lb_facts) before Ansible 2.9. The usage did not change.
version_added: "2.4" version_added: "2.4"
requirements: [ boto3 ] requirements: [ boto3 ]
author: Rob White (@wimnat) author: Rob White (@wimnat)
@ -37,26 +38,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.
# Gather facts about all target groups # Gather information about all target groups
- elb_application_lb_facts: - elb_application_lb_info:
# Gather facts about the target group attached to a particular ELB # Gather information about the target group attached to a particular ELB
- elb_application_lb_facts: - elb_application_lb_info:
load_balancer_arns: load_balancer_arns:
- "arn:aws:elasticloadbalancing:ap-southeast-2:001122334455:loadbalancer/app/my-elb/aabbccddeeff" - "arn:aws:elasticloadbalancing:ap-southeast-2:001122334455:loadbalancer/app/my-elb/aabbccddeeff"
# Gather facts about a target groups named 'tg1' and 'tg2' # Gather information about a target groups named 'tg1' and 'tg2'
- elb_application_lb_facts: - elb_application_lb_info:
names: names:
- elb1 - elb1
- elb2 - elb2
# Gather facts about specific ALB # Gather information about specific ALB
- elb_application_lb_facts: - elb_application_lb_info:
names: "alb-name" names: "alb-name"
region: "aws-region" region: "aws-region"
register: alb_facts register: alb_info
- debug: var=alb_facts - debug: var=alb_info
''' '''
RETURN = ''' RETURN = '''
@ -268,6 +269,8 @@ def main():
mutually_exclusive=[['load_balancer_arns', 'names']], mutually_exclusive=[['load_balancer_arns', 'names']],
supports_check_mode=True supports_check_mode=True
) )
if module._name == 'elb_application_lb_facts':
module.deprecate("The 'elb_application_lb_facts' module has been renamed to 'elb_application_lb_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

@ -20,10 +20,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: elb_classic_lb_facts module: elb_classic_lb_info
short_description: Gather facts about EC2 Elastic Load Balancers in AWS short_description: Gather information about EC2 Elastic Load Balancers in AWS
description: description:
- Gather facts about EC2 Elastic Load Balancers in AWS - Gather information about EC2 Elastic Load Balancers in AWS
- This module was called C(elb_classic_lb_facts) before Ansible 2.9. The usage did not change.
version_added: "2.0" version_added: "2.0"
author: author:
- "Michael Schultz (@mjschultz)" - "Michael Schultz (@mjschultz)"
@ -31,7 +32,7 @@ author:
options: options:
names: names:
description: description:
- List of ELB names to gather facts about. Pass this option to gather facts about a set of ELBs, otherwise, all ELBs are returned. - List of ELB names to gather information about. Pass this option to gather information about a set of ELBs, otherwise, all ELBs are returned.
aliases: ['elb_ids', 'ec2_elbs'] aliases: ['elb_ids', 'ec2_elbs']
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
@ -45,32 +46,32 @@ 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.
# Output format tries to match ec2_elb_lb module input parameters # Output format tries to match ec2_elb_lb module input parameters
# Gather facts about all ELBs # Gather information about all ELBs
- elb_classic_lb_facts: - elb_classic_lb_info:
register: elb_facts register: elb_info
- debug: - debug:
msg: "{{ item.dns_name }}" msg: "{{ item.dns_name }}"
loop: "{{ elb_facts.elbs }}" loop: "{{ elb_info.elbs }}"
# Gather facts about a particular ELB # Gather information about a particular ELB
- elb_classic_lb_facts: - elb_classic_lb_info:
names: frontend-prod-elb names: frontend-prod-elb
register: elb_facts register: elb_info
- debug: - debug:
msg: "{{ elb_facts.elbs.0.dns_name }}" msg: "{{ elb_info.elbs.0.dns_name }}"
# Gather facts about a set of ELBs # Gather information about a set of ELBs
- elb_classic_lb_facts: - elb_classic_lb_info:
names: names:
- frontend-prod-elb - frontend-prod-elb
- backend-prod-elb - backend-prod-elb
register: elb_facts register: elb_info
- debug: - debug:
msg: "{{ item.dns_name }}" msg: "{{ item.dns_name }}"
loop: "{{ elb_facts.elbs }}" loop: "{{ elb_info.elbs }}"
''' '''
@ -203,6 +204,8 @@ def main():
) )
module = AnsibleAWSModule(argument_spec=argument_spec, module = AnsibleAWSModule(argument_spec=argument_spec,
supports_check_mode=True) supports_check_mode=True)
if module._name == 'elb_classic_lb_facts':
module.deprecate("The 'elb_classic_lb_facts' module has been renamed to 'elb_classic_lb_info'", version='2.13')
region, ec2_url, aws_connect_params = get_aws_connection_info(module, boto3=True) region, ec2_url, aws_connect_params = get_aws_connection_info(module, boto3=True)
connection = boto3_conn(module, conn_type='client', resource='elb', region=region, endpoint=ec2_url, **aws_connect_params) connection = boto3_conn(module, conn_type='client', resource='elb', region=region, endpoint=ec2_url, **aws_connect_params)
@ -210,7 +213,7 @@ def main():
try: try:
elbs = list_elbs(connection, module.params.get('names')) elbs = list_elbs(connection, module.params.get('names'))
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Failed to get load balancer facts.") module.fail_json_aws(e, msg="Failed to get load balancer information.")
module.exit_json(elbs=elbs) module.exit_json(elbs=elbs)

View file

@ -12,10 +12,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: elb_target_group_facts module: elb_target_group_info
short_description: Gather facts about ELB target groups in AWS short_description: Gather information about ELB target groups in AWS
description: description:
- Gather facts about ELB target groups in AWS - Gather information about ELB target groups in AWS
- This module was called C(elb_target_group_facts) before Ansible 2.9. The usage did not change.
version_added: "2.4" version_added: "2.4"
requirements: [ boto3 ] requirements: [ boto3 ]
author: Rob White (@wimnat) author: Rob White (@wimnat)
@ -48,15 +49,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 target groups # Gather information about all target groups
- elb_target_group_facts: - elb_target_group_info:
# Gather facts about the target group attached to a particular ELB # Gather information about the target group attached to a particular ELB
- elb_target_group_facts: - elb_target_group_info:
load_balancer_arn: "arn:aws:elasticloadbalancing:ap-southeast-2:001122334455:loadbalancer/app/my-elb/aabbccddeeff" load_balancer_arn: "arn:aws:elasticloadbalancing:ap-southeast-2:001122334455:loadbalancer/app/my-elb/aabbccddeeff"
# Gather facts about a target groups named 'tg1' and 'tg2' # Gather information about a target groups named 'tg1' and 'tg2'
- elb_target_group_facts: - elb_target_group_info:
names: names:
- tg1 - tg1
- tg2 - tg2
@ -305,6 +306,8 @@ def main():
mutually_exclusive=[['load_balancer_arn', 'target_group_arns', 'names']], mutually_exclusive=[['load_balancer_arn', 'target_group_arns', 'names']],
supports_check_mode=True supports_check_mode=True
) )
if module._name == 'elb_target_group_facts':
module.deprecate("The 'elb_target_group_facts' module has been renamed to 'elb_target_group_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

@ -10,18 +10,19 @@ ANSIBLE_METADATA = {"metadata_version": "1.1",
DOCUMENTATION = """ DOCUMENTATION = """
--- ---
module: elb_target_facts module: elb_target_info
short_description: Gathers which target groups a target is associated with. short_description: Gathers which target groups a target is associated with.
description: description:
- This module will search through every target group in a region to find - This module will search through every target group in a region to find
which ones have registered a given instance ID or IP. which ones have registered a given instance ID or IP.
- This module was called C(elb_target_facts) before Ansible 2.9. The usage did not change.
version_added: "2.7" version_added: "2.7"
author: "Yaakov Kuperman (@yaakov-github)" author: "Yaakov Kuperman (@yaakov-github)"
options: options:
instance_id: instance_id:
description: description:
- What instance ID to get facts for. - What instance ID to get information for.
type: str type: str
required: true required: true
get_unused_target_groups: get_unused_target_groups:
@ -46,14 +47,14 @@ EXAMPLES = """
- name: Get initial list of target groups - name: Get initial list of target groups
delegate_to: localhost delegate_to: localhost
elb_target_facts: elb_target_info:
instance_id: "{{ ansible_ec2_instance_id }}" instance_id: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}" region: "{{ ansible_ec2_placement_region }}"
register: target_facts register: target_info
- name: save fact for later - name: save fact for later
set_fact: set_fact:
original_tgs: "{{ target_facts.instance_target_groups }}" original_tgs: "{{ target_info.instance_target_groups }}"
- name: Deregister instance from all target groups - name: Deregister instance from all target groups
delegate_to: localhost delegate_to: localhost
@ -75,12 +76,12 @@ EXAMPLES = """
- name: wait for all targets to deregister simultaneously - name: wait for all targets to deregister simultaneously
delegate_to: localhost delegate_to: localhost
elb_target_facts: elb_target_info:
get_unused_target_groups: false get_unused_target_groups: false
instance_id: "{{ ansible_ec2_instance_id }}" instance_id: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}" region: "{{ ansible_ec2_placement_region }}"
register: target_facts register: target_info
until: (target_facts.instance_target_groups | length) == 0 until: (target_info.instance_target_groups | length) == 0
retries: 60 retries: 60
delay: 10 delay: 10
@ -100,12 +101,12 @@ EXAMPLES = """
# wait until all groups associated with this instance are 'healthy' or # wait until all groups associated with this instance are 'healthy' or
# 'unused' # 'unused'
- name: wait for registration - name: wait for registration
elb_target_facts: elb_target_info:
get_unused_target_groups: false get_unused_target_groups: false
instance_id: "{{ ansible_ec2_instance_id }}" instance_id: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}" region: "{{ ansible_ec2_placement_region }}"
register: target_facts register: target_info
until: (target_facts.instance_target_groups | until: (target_info.instance_target_groups |
map(attribute='targets') | map(attribute='targets') |
flatten | flatten |
map(attribute='target_health') | map(attribute='target_health') |
@ -129,7 +130,7 @@ EXAMPLES = """
Port={{target.target_port}}{%if target.target_az%},AvailabilityZone={{target.target_az}} Port={{target.target_port}}{%if target.target_az%},AvailabilityZone={{target.target_az}}
{%endif%} {%endif%}
{%endfor%} {%endfor%}
loop: "{{target_facts.instance_target_groups}}" loop: "{{target_info.instance_target_groups}}"
""" """
@ -256,7 +257,7 @@ class TargetGroup(object):
return list(self.targets) return list(self.targets)
class TargetFactsGatherer(object): class TargetInfoGatherer(object):
def __init__(self, module, instance_id, get_unused_target_groups): def __init__(self, module, instance_id, get_unused_target_groups):
self.module = module self.module = module
@ -416,11 +417,13 @@ def main():
argument_spec=argument_spec, argument_spec=argument_spec,
supports_check_mode=True, supports_check_mode=True,
) )
if module._name == 'elb_target_facts':
module.deprecate("The 'elb_target_facts' module has been renamed to 'elb_target_info'", version='2.13')
instance_id = module.params["instance_id"] instance_id = module.params["instance_id"]
get_unused_target_groups = module.params["get_unused_target_groups"] get_unused_target_groups = module.params["get_unused_target_groups"]
tg_gatherer = TargetFactsGatherer(module, tg_gatherer = TargetInfoGatherer(module,
instance_id, instance_id,
get_unused_target_groups get_unused_target_groups
) )

View file

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: iam_mfa_device_facts module: iam_mfa_device_info
short_description: List the MFA (Multi-Factor Authentication) devices registered for a user short_description: List the MFA (Multi-Factor Authentication) devices registered for a user
description: description:
- List the MFA (Multi-Factor Authentication) devices registered for a user - List the MFA (Multi-Factor Authentication) devices registered for a user
- This module was called C(iam_mfa_device_facts) before Ansible 2.9. The usage did not change.
version_added: "2.2" version_added: "2.2"
author: Victor Costan (@pwnall) author: Victor Costan (@pwnall)
options: options:
@ -49,7 +50,7 @@ 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.
# List MFA devices (more details: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListMFADevices.html) # List MFA devices (more details: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListMFADevices.html)
- iam_mfa_device_facts: - iam_mfa_device_info:
register: mfa_devices register: mfa_devices
# Assume an existing role (more details: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) # Assume an existing role (more details: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html)
@ -96,6 +97,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name == 'iam_mfa_device_facts':
module.deprecate("The 'iam_mfa_device_facts' module has been renamed to 'iam_mfa_device_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

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: iam_role_facts module: iam_role_info
short_description: Gather information on IAM roles short_description: Gather information on IAM roles
description: description:
- Gathers information about IAM roles - Gathers information about IAM roles
- This module was called C(iam_role_facts) before Ansible 2.9. The usage did not change.
version_added: "2.5" version_added: "2.5"
requirements: [ boto3 ] requirements: [ boto3 ]
author: author:
@ -39,15 +40,15 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# find all existing IAM roles # find all existing IAM roles
- iam_role_facts: - iam_role_info:
register: result register: result
# describe a single role # describe a single role
- iam_role_facts: - iam_role_info:
name: MyIAMRole name: MyIAMRole
# describe all roles matching a path prefix # describe all roles matching a path prefix
- iam_role_facts: - iam_role_info:
path_prefix: /application/path path_prefix: /application/path
''' '''
@ -235,6 +236,8 @@ def main():
module = AnsibleAWSModule(argument_spec=argument_spec, module = AnsibleAWSModule(argument_spec=argument_spec,
supports_check_mode=True, supports_check_mode=True,
mutually_exclusive=[['name', 'path_prefix']]) mutually_exclusive=[['name', 'path_prefix']])
if module._name == 'iam_role_facts':
module.deprecate("The 'iam_role_facts' module has been renamed to 'iam_role_info'", version='2.13')
region, ec2_url, aws_connect_params = get_aws_connection_info(module, boto3=True) region, ec2_url, aws_connect_params = get_aws_connection_info(module, boto3=True)
client = boto3_conn(module, conn_type='client', resource='iam', client = boto3_conn(module, conn_type='client', resource='iam',

View file

@ -13,10 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: iam_server_certificate_facts module: iam_server_certificate_info
short_description: Retrieve the facts of a server certificate short_description: Retrieve the information of a server certificate
description: description:
- Retrieve the attributes of a server certificate - Retrieve the attributes of a server certificate
- This module was called C(iam_server_certificate_facts) before Ansible 2.9. The usage did not change.
version_added: "2.2" version_added: "2.2"
author: "Allen Sanabria (@linuxdynasty)" author: "Allen Sanabria (@linuxdynasty)"
requirements: [boto3, botocore] requirements: [boto3, botocore]
@ -32,12 +33,12 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Retrieve server certificate # Retrieve server certificate
- iam_server_certificate_facts: - iam_server_certificate_info:
name: production-cert name: production-cert
register: server_cert register: server_cert
# Fail if the server certificate name was not found # Fail if the server certificate name was not found
- iam_server_certificate_facts: - iam_server_certificate_info:
name: production-cert name: production-cert
register: server_cert register: server_cert
failed_when: "{{ server_cert.results | length == 0 }}" failed_when: "{{ server_cert.results | length == 0 }}"
@ -150,6 +151,8 @@ def main():
)) ))
module = AnsibleModule(argument_spec=argument_spec,) module = AnsibleModule(argument_spec=argument_spec,)
if module._name == 'iam_server_certificate_facts':
module.deprecate("The 'iam_server_certificate_facts' module has been renamed to 'iam_server_certificate_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

@ -10,11 +10,12 @@ ANSIBLE_METADATA = {'status': ['preview'],
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: rds_instance_facts module: rds_instance_info
version_added: "2.6" version_added: "2.6"
short_description: obtain facts about one or more RDS instances short_description: obtain information about one or more RDS instances
description: description:
- obtain facts about one or more RDS instances - obtain information about one or more RDS instances
- This module was called C(rds_instance_facts) before Ansible 2.9. The usage did not change.
options: options:
db_instance_identifier: db_instance_identifier:
description: description:
@ -38,13 +39,13 @@ extends_documentation_fragment:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Get facts about an instance # Get information about an instance
- rds_instance_facts: - rds_instance_info:
db_instance_identifier: new-database db_instance_identifier: new-database
register: new_database_facts register: new_database_info
# Get all RDS instances # Get all RDS instances
- rds_instance_facts: - rds_instance_info:
''' '''
RETURN = ''' RETURN = '''
@ -350,7 +351,7 @@ except ImportError:
pass # handled by AnsibleAWSModule pass # handled by AnsibleAWSModule
def instance_facts(module, conn): def instance_info(module, conn):
instance_name = module.params.get('db_instance_identifier') instance_name = module.params.get('db_instance_identifier')
filters = module.params.get('filters') filters = module.params.get('filters')
@ -388,10 +389,12 @@ def main():
argument_spec=argument_spec, argument_spec=argument_spec,
supports_check_mode=True, supports_check_mode=True,
) )
if module._name == 'rds_instance_facts':
module.deprecate("The 'rds_instance_facts' module has been renamed to 'rds_instance_info'", version='2.13')
conn = module.client('rds', retry_decorator=AWSRetry.jittered_backoff(retries=10)) conn = module.client('rds', retry_decorator=AWSRetry.jittered_backoff(retries=10))
module.exit_json(**instance_facts(module, conn)) module.exit_json(**instance_info(module, conn))
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -10,12 +10,13 @@ ANSIBLE_METADATA = {'status': ['preview'],
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: rds_snapshot_facts module: rds_snapshot_info
version_added: "2.6" version_added: "2.6"
short_description: obtain facts about one or more RDS snapshots short_description: obtain information about one or more RDS snapshots
description: description:
- obtain facts about one or more RDS snapshots. These can be for unclustered snapshots or snapshots of clustered DBs (Aurora) - obtain information about one or more RDS snapshots. These can be for unclustered snapshots or snapshots of clustered DBs (Aurora)
- Aurora snapshot facts may be obtained if no identifier parameters are passed or if one of the cluster parameters are passed. - Aurora snapshot information may be obtained if no identifier parameters are passed or if one of the cluster parameters are passed.
- This module was called C(rds_snapshot_facts) before Ansible 2.9. The usage did not change.
options: options:
db_snapshot_identifier: db_snapshot_identifier:
description: description:
@ -54,13 +55,13 @@ extends_documentation_fragment:
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Get facts about an snapshot # Get information about an snapshot
- rds_snapshot_facts: - rds_snapshot_info:
db_snapshot_identifier: snapshot_name db_snapshot_identifier: snapshot_name
register: new_database_facts register: new_database_info
# Get all RDS snapshots for an RDS instance # Get all RDS snapshots for an RDS instance
- rds_snapshot_facts: - rds_snapshot_info:
db_instance_identifier: helloworld-rds-master db_instance_identifier: helloworld-rds-master
''' '''
@ -293,7 +294,7 @@ except Exception:
pass # caught by imported HAS_BOTO3 pass # caught by imported HAS_BOTO3
def common_snapshot_facts(module, conn, method, prefix, params): def common_snapshot_info(module, conn, method, prefix, params):
paginator = conn.get_paginator(method) paginator = conn.get_paginator(method)
try: try:
results = paginator.paginate(**params).build_full_result()['%ss' % prefix] results = paginator.paginate(**params).build_full_result()['%ss' % prefix]
@ -312,7 +313,7 @@ def common_snapshot_facts(module, conn, method, prefix, params):
return [camel_dict_to_snake_dict(snapshot, ignore_list=['Tags']) for snapshot in results] return [camel_dict_to_snake_dict(snapshot, ignore_list=['Tags']) for snapshot in results]
def cluster_snapshot_facts(module, conn): def cluster_snapshot_info(module, conn):
snapshot_name = module.params.get('db_cluster_snapshot_identifier') snapshot_name = module.params.get('db_cluster_snapshot_identifier')
snapshot_type = module.params.get('snapshot_type') snapshot_type = module.params.get('snapshot_type')
instance_name = module.params.get('db_cluster_instance_identifier') instance_name = module.params.get('db_cluster_instance_identifier')
@ -329,10 +330,10 @@ def cluster_snapshot_facts(module, conn):
elif snapshot_type == 'shared': elif snapshot_type == 'shared':
params['IsShared'] = True params['IsShared'] = True
return common_snapshot_facts(module, conn, 'describe_db_cluster_snapshots', 'DBClusterSnapshot', params) return common_snapshot_info(module, conn, 'describe_db_cluster_snapshots', 'DBClusterSnapshot', params)
def standalone_snapshot_facts(module, conn): def standalone_snapshot_info(module, conn):
snapshot_name = module.params.get('db_snapshot_identifier') snapshot_name = module.params.get('db_snapshot_identifier')
snapshot_type = module.params.get('snapshot_type') snapshot_type = module.params.get('snapshot_type')
instance_name = module.params.get('db_instance_identifier') instance_name = module.params.get('db_instance_identifier')
@ -349,7 +350,7 @@ def standalone_snapshot_facts(module, conn):
elif snapshot_type == 'shared': elif snapshot_type == 'shared':
params['IsShared'] = True params['IsShared'] = True
return common_snapshot_facts(module, conn, 'describe_db_snapshots', 'DBSnapshot', params) return common_snapshot_info(module, conn, 'describe_db_snapshots', 'DBSnapshot', params)
def main(): def main():
@ -366,13 +367,15 @@ def main():
supports_check_mode=True, supports_check_mode=True,
mutually_exclusive=[['db_snapshot_identifier', 'db_instance_identifier', 'db_cluster_identifier', 'db_cluster_snapshot_identifier']] mutually_exclusive=[['db_snapshot_identifier', 'db_instance_identifier', 'db_cluster_identifier', 'db_cluster_snapshot_identifier']]
) )
if module._name == 'rds_snapshot_facts':
module.deprecate("The 'rds_snapshot_facts' module has been renamed to 'rds_snapshot_info'", version='2.13')
conn = module.client('rds', retry_decorator=AWSRetry.jittered_backoff(retries=10)) conn = module.client('rds', retry_decorator=AWSRetry.jittered_backoff(retries=10))
results = dict() results = dict()
if not module.params['db_cluster_identifier'] and not module.params['db_cluster_snapshot_identifier']: if not module.params['db_cluster_identifier'] and not module.params['db_cluster_snapshot_identifier']:
results['snapshots'] = standalone_snapshot_facts(module, conn) results['snapshots'] = standalone_snapshot_info(module, conn)
if not module.params['db_snapshot_identifier'] and not module.params['db_instance_identifier']: if not module.params['db_snapshot_identifier'] and not module.params['db_instance_identifier']:
results['cluster_snapshots'] = cluster_snapshot_facts(module, conn) results['cluster_snapshots'] = cluster_snapshot_info(module, conn)
module.exit_json(changed=False, **results) module.exit_json(changed=False, **results)

View file

@ -13,11 +13,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: redshift_facts module: redshift_info
author: "Jens Carl (@j-carl)" author: "Jens Carl (@j-carl)"
short_description: Gather facts about Redshift cluster(s) short_description: Gather information about Redshift cluster(s)
description: description:
- Gather facts about Redshift cluster(s) - Gather information about Redshift cluster(s)
- This module was called C(redshift_facts) before Ansible 2.9. The usage did not change.
version_added: "2.4" version_added: "2.4"
requirements: [ boto3 ] requirements: [ boto3 ]
options: options:
@ -41,18 +42,18 @@ EXAMPLES = '''
# Note: These examples do net set authentication details, see the AWS guide for details. # Note: These examples do net set authentication details, see the AWS guide for details.
# Find all clusters # Find all clusters
- redshift_facts: - redshift_info:
register: redshift register: redshift
# Find cluster(s) with matching tags # Find cluster(s) with matching tags
- redshift_facts: - redshift_info:
tags: tags:
env: prd env: prd
stack: monitoring stack: monitoring
register: redshift_tags register: redshift_tags
# Find cluster(s) with matching name/prefix and tags # Find cluster(s) with matching name/prefix and tags
- redshift_facts: - redshift_info:
tags: tags:
env: dev env: dev
stack: web stack: web
@ -60,7 +61,7 @@ EXAMPLES = '''
register: redshift_web register: redshift_web
# Fail if no cluster(s) is/are found # Fail if no cluster(s) is/are found
- redshift_facts: - redshift_info:
tags: tags:
env: stg env: stg
stack: db stack: db
@ -340,6 +341,8 @@ def main():
argument_spec=argument_spec, argument_spec=argument_spec,
supports_check_mode=True supports_check_mode=True
) )
if module._name == 'redshift_facts':
module.deprecate("The 'redshift_facts' module has been renamed to 'redshift_info'", version='2.13')
cluster_identifier = module.params.get('cluster_identifier') cluster_identifier = module.params.get('cluster_identifier')
cluster_tags = module.params.get('tags') cluster_tags = module.params.get('tags')

View file

@ -12,10 +12,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
module: route53_facts module: route53_info
short_description: Retrieves route53 details using AWS methods short_description: Retrieves route53 details using AWS methods
description: description:
- Gets various details related to Route53 zone, record set or health check details. - Gets various details related to Route53 zone, record set or health check details.
- This module was called C(route53_facts) before Ansible 2.9. The usage did not change.
version_added: "2.0" version_added: "2.0"
options: options:
query: query:
@ -126,19 +127,19 @@ extends_documentation_fragment:
EXAMPLES = ''' EXAMPLES = '''
# Simple example of listing all hosted zones # Simple example of listing all hosted zones
- name: List all hosted zones - name: List all hosted zones
route53_facts: route53_info:
query: hosted_zone query: hosted_zone
register: hosted_zones register: hosted_zones
# Getting a count of hosted zones # Getting a count of hosted zones
- name: Return a count of all hosted zones - name: Return a count of all hosted zones
route53_facts: route53_info:
query: hosted_zone query: hosted_zone
hosted_zone_method: count hosted_zone_method: count
register: hosted_zone_count register: hosted_zone_count
- name: List the first 20 resource record sets in a given hosted zone - name: List the first 20 resource record sets in a given hosted zone
route53_facts: route53_info:
profile: account_name profile: account_name
query: record_sets query: record_sets
hosted_zone_id: ZZZ1111112222 hosted_zone_id: ZZZ1111112222
@ -146,37 +147,37 @@ EXAMPLES = '''
register: record_sets register: record_sets
- name: List first 20 health checks - name: List first 20 health checks
route53_facts: route53_info:
query: health_check query: health_check
health_check_method: list health_check_method: list
max_items: 20 max_items: 20
register: health_checks register: health_checks
- name: Get health check last failure_reason - name: Get health check last failure_reason
route53_facts: route53_info:
query: health_check query: health_check
health_check_method: failure_reason health_check_method: failure_reason
health_check_id: 00000000-1111-2222-3333-12345678abcd health_check_id: 00000000-1111-2222-3333-12345678abcd
register: health_check_failure_reason register: health_check_failure_reason
- name: Retrieve reusable delegation set details - name: Retrieve reusable delegation set details
route53_facts: route53_info:
query: reusable_delegation_set query: reusable_delegation_set
delegation_set_id: delegation id delegation_set_id: delegation id
register: delegation_sets register: delegation_sets
- name: setup of example for using next_marker - name: setup of example for using next_marker
route53_facts: route53_info:
query: hosted_zone query: hosted_zone
max_items: 1 max_items: 1
register: first_facts register: first_info
- name: example for using next_marker - name: example for using next_marker
route53_facts: route53_info:
query: hosted_zone query: hosted_zone
next_marker: "{{ first_facts.NextMarker }}" next_marker: "{{ first_info.NextMarker }}"
max_items: 1 max_items: 1
when: "{{ 'NextMarker' in first_facts }}" when: "{{ 'NextMarker' in first_info }}"
- name: retrieve host entries starting with host1.workshop.test.io - name: retrieve host entries starting with host1.workshop.test.io
block: block:
@ -186,7 +187,7 @@ EXAMPLES = '''
register: AWSINFO register: AWSINFO
- name: grab Route53 record information - name: grab Route53 record information
route53_facts: route53_info:
type: A type: A
query: record_sets query: record_sets
hosted_zone_id: "{{ AWSINFO.zone_id }}" hosted_zone_id: "{{ AWSINFO.zone_id }}"
@ -437,6 +438,8 @@ def main():
['hosted_zone_method', 'health_check_method'], ['hosted_zone_method', 'health_check_method'],
], ],
) )
if module._name == 'route53_facts':
module.deprecate("The 'route53_facts' module has been renamed to 'route53_info'", version='2.13')
# Validate Requirements # Validate Requirements
if not (HAS_BOTO or HAS_BOTO3): if not (HAS_BOTO or HAS_BOTO3):

View file

@ -26,18 +26,18 @@
register: iam_role_output register: iam_role_output
ignore_errors: yes ignore_errors: yes
# CI does not remove the role and comparing policies has a bug on Python3; fall back to use iam_role_facts # CI does not remove the role and comparing policies has a bug on Python3; fall back to use iam_role_info
- name: get IAM role - name: get IAM role
iam_role_facts: iam_role_info:
<<: *aws_connection_info <<: *aws_connection_info
name: "test-secrets-manager-role" name: "test-secrets-manager-role"
when: iam_role_output is failed when: iam_role_output is failed
register: iam_role_facts register: iam_role_info
- name: set iam_role_output - name: set iam_role_output
set_fact: set_fact:
iam_role_output: "{{ iam_role_facts.iam_roles[0] }}" iam_role_output: "{{ iam_role_info.iam_roles[0] }}"
when: iam_role_facts is defined when: iam_role_info is defined
- name: create a temporary directory - name: create a temporary directory
tempfile: tempfile:

View file

@ -85,7 +85,7 @@
register: lock_attempt_log_group_result register: lock_attempt_log_group_result
- name: Get Lock Attempt Lock Groups - name: Get Lock Attempt Lock Groups
cloudwatchlogs_log_group_facts: cloudwatchlogs_log_group_info:
log_group_name: "{{ lock_log_group_prefix }}/" log_group_name: "{{ lock_log_group_prefix }}/"
<<: *aws_connection_info <<: *aws_connection_info
register: lock_attempt_log_groups register: lock_attempt_log_groups

View file

@ -33,7 +33,7 @@
<<: *aws_connection_info <<: *aws_connection_info
- name: ensure AWSServiceRoleForECS role exists - name: ensure AWSServiceRoleForECS role exists
iam_role_facts: iam_role_info:
name: AWSServiceRoleForECS name: AWSServiceRoleForECS
<<: *aws_connection_info <<: *aws_connection_info
register: iam_role_result register: iam_role_result

View file

@ -3,4 +3,4 @@
environment: "{{ ansible_test.environment }}" environment: "{{ ansible_test.environment }}"
roles: roles:
- elb_target_facts - elb_target_info

View file

@ -1,10 +1,10 @@
--- ---
- name: set up elb_target_facts test prerequisites - name: set up elb_target_info test prerequisites
block: block:
- name: - name:
debug: msg="********** Setting up elb_target_facts test dependencies **********" debug: msg="********** Setting up elb_target_info test dependencies **********"
# ============================================================ # ============================================================
- name: set up aws connection info - name: set up aws connection info
@ -213,11 +213,11 @@
# ============================================================ # ============================================================
- debug: msg="********** Running elb_target_facts integration tests **********" - debug: msg="********** Running elb_target_info integration tests **********"
# ============================================================ # ============================================================
- name: gather facts - name: gather facts
elb_target_facts: elb_target_info:
instance_id: "{{ ec2.instance_ids[0]}}" instance_id: "{{ ec2.instance_ids[0]}}"
<<: *aws_connection_info <<: *aws_connection_info
register: target_facts register: target_facts
@ -240,7 +240,7 @@
<<: *aws_connection_info <<: *aws_connection_info
- name: gather facts again, including the idle group - name: gather facts again, including the idle group
elb_target_facts: elb_target_info:
instance_id: "{{ ec2.instance_ids[0]}}" instance_id: "{{ ec2.instance_ids[0]}}"
<<: *aws_connection_info <<: *aws_connection_info
register: target_facts register: target_facts
@ -254,7 +254,7 @@
msg: "target facts reflected the addition of the target to the idle group" msg: "target facts reflected the addition of the target to the idle group"
- name: gather facts again, this time excluding the idle group - name: gather facts again, this time excluding the idle group
elb_target_facts: elb_target_info:
instance_id: "{{ ec2.instance_ids[0]}}" instance_id: "{{ ec2.instance_ids[0]}}"
get_unused_target_groups: false get_unused_target_groups: false
<<: *aws_connection_info <<: *aws_connection_info
@ -279,7 +279,7 @@
<<: *aws_connection_info <<: *aws_connection_info
- name: gather facts - name: gather facts
elb_target_facts: elb_target_info:
instance_id: "{{ ec2.instance_ids[0] }}" instance_id: "{{ ec2.instance_ids[0] }}"
get_unused_target_groups: false get_unused_target_groups: false
<<: *aws_connection_info <<: *aws_connection_info
@ -315,7 +315,7 @@
- "targets" - "targets"
- name: wait for all targets to deregister simultaneously - name: wait for all targets to deregister simultaneously
elb_target_facts: elb_target_info:
get_unused_target_groups: false get_unused_target_groups: false
instance_id: "{{ ec2.instance_ids[0] }}" instance_id: "{{ ec2.instance_ids[0] }}"
<<: *aws_connection_info <<: *aws_connection_info
@ -340,7 +340,7 @@
# wait until all groups associated with this instance are 'healthy' or # wait until all groups associated with this instance are 'healthy' or
# 'unused' # 'unused'
- name: wait for registration - name: wait for registration
elb_target_facts: elb_target_info:
get_unused_target_groups: false get_unused_target_groups: false
instance_id: "{{ ec2.instance_ids[0] }}" instance_id: "{{ ec2.instance_ids[0] }}"
<<: *aws_connection_info <<: *aws_connection_info
@ -373,7 +373,7 @@
always: always:
- name: - name:
debug: msg="********** Tearing down elb_target_facts test dependencies **********" debug: msg="********** Tearing down elb_target_info test dependencies **********"
- name: remove ec2 instance - name: remove ec2 instance
ec2: ec2:

View file

@ -48,7 +48,7 @@
- "result.final_snapshot.db_instance_identifier == '{{ instance_id }}'" - "result.final_snapshot.db_instance_identifier == '{{ instance_id }}'"
- name: Check that snapshot exists - name: Check that snapshot exists
rds_snapshot_facts: rds_snapshot_info:
db_snapshot_identifier: "{{ instance_id }}" db_snapshot_identifier: "{{ instance_id }}"
<<: *aws_connection_info <<: *aws_connection_info
register: result register: result

View file

@ -161,7 +161,7 @@
- caa is not failed - caa is not failed
- caa is not changed - caa is not changed
always: always:
- route53_facts: - route53_info:
query: record_sets query: record_sets
hosted_zone_id: '{{ z1.zone_id }}' hosted_zone_id: '{{ z1.zone_id }}'
register: z1_records register: z1_records

View file

@ -48,7 +48,7 @@ lib/ansible/modules/cloud/amazon/elasticache.py E326
lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py E326 lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py E326
lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py E324 lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py E324
lib/ansible/modules/cloud/amazon/elb_application_lb.py E324 lib/ansible/modules/cloud/amazon/elb_application_lb.py E324
lib/ansible/modules/cloud/amazon/elb_classic_lb_facts.py E323 lib/ansible/modules/cloud/amazon/elb_classic_lb_info.py E323
lib/ansible/modules/cloud/amazon/elb_instance.py E326 lib/ansible/modules/cloud/amazon/elb_instance.py E326
lib/ansible/modules/cloud/amazon/elb_target.py E327 lib/ansible/modules/cloud/amazon/elb_target.py E327
lib/ansible/modules/cloud/amazon/elb_target_group.py E324 lib/ansible/modules/cloud/amazon/elb_target_group.py E324