AWS ELB: Sanity Test fixups (#64008)

pull/64020/head
Mark Chappell 6 years ago committed by John R Barker
parent 8d7580a59f
commit cd7bfc09a1

@ -29,13 +29,16 @@ options:
- register or deregister the instance - register or deregister the instance
required: true required: true
choices: ['present', 'absent'] choices: ['present', 'absent']
type: str
instance_id: instance_id:
description: description:
- EC2 Instance ID - EC2 Instance ID
required: true required: true
type: str
ec2_elbs: ec2_elbs:
description: description:
- List of ELB names, required for registration. The ec2_elbs fact should be used if there was a previous de-register. - List of ELB names, required for registration. The ec2_elbs fact should be used if there was a previous de-register.
type: list
enable_availability_zone: enable_availability_zone:
description: description:
- Whether to enable the availability zone of the instance on the target ELB if the availability zone has not already - Whether to enable the availability zone of the instance on the target ELB if the availability zone has not already
@ -47,18 +50,13 @@ options:
- Wait for instance registration or deregistration to complete successfully before returning. - Wait for instance registration or deregistration to complete successfully before returning.
type: bool type: bool
default: 'yes' default: 'yes'
validate_certs:
description:
- When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
type: bool
default: 'yes'
version_added: "1.5"
wait_timeout: wait_timeout:
description: description:
- Number of seconds to wait for an instance to change state. If 0 then this module may return an error if a transient error occurs. - Number of seconds to wait for an instance to change state. If 0 then this module may return an error if a transient error occurs.
If non-zero then any transient errors are ignored until the timeout is reached. Ignored when wait=no. If non-zero then any transient errors are ignored until the timeout is reached. Ignored when wait=no.
default: 0 default: 0
version_added: "1.6" version_added: "1.6"
type: int
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2
@ -321,7 +319,7 @@ class ElbManager:
def main(): def main():
argument_spec = ec2_argument_spec() argument_spec = ec2_argument_spec()
argument_spec.update(dict( argument_spec.update(dict(
state={'required': True}, state={'required': True, 'choices': ['present', 'absent']},
instance_id={'required': True}, instance_id={'required': True},
ec2_elbs={'default': None, 'required': False, 'type': 'list'}, ec2_elbs={'default': None, 'required': False, 'type': 'list'},
enable_availability_zone={'default': True, 'required': False, 'type': 'bool'}, enable_availability_zone={'default': True, 'required': False, 'type': 'bool'},

@ -13,6 +13,9 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>. # along with this library. If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'], 'status': ['preview'],
'supported_by': 'community'} 'supported_by': 'community'}
@ -33,7 +36,7 @@ options:
names: names:
description: description:
- List of ELB names to gather information about. Pass this option to gather information 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'] type: list
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2

@ -14,6 +14,9 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'], 'status': ['preview'],
'supported_by': 'community'} 'supported_by': 'community'}
@ -40,12 +43,14 @@ options:
- The bucket must exist in the same - The bucket must exist in the same
region as the load balancer and have a bucket policy that grants Elastic Load Balancing permission to write to the bucket. region as the load balancer and have a bucket policy that grants Elastic Load Balancing permission to write to the bucket.
required: false required: false
type: str
access_logs_s3_prefix: access_logs_s3_prefix:
description: description:
- The prefix for the log location in the S3 bucket. - The prefix for the log location in the S3 bucket.
- If you don't specify a prefix, the access logs are stored in the root of the bucket. - If you don't specify a prefix, the access logs are stored in the root of the bucket.
- Cannot begin or end with a slash. - Cannot begin or end with a slash.
required: false required: false
type: str
deletion_protection: deletion_protection:
description: description:
- Indicates whether deletion protection for the ELB is enabled. - Indicates whether deletion protection for the ELB is enabled.
@ -63,17 +68,62 @@ options:
description: description:
- The number of seconds to wait before an idle connection is closed. - The number of seconds to wait before an idle connection is closed.
required: false required: false
default: 60 type: int
listeners: listeners:
description: description:
- A list of dicts containing listeners to attach to the ELB. See examples for detail of the dict required. Note that listener keys - A list of dicts containing listeners to attach to the ELB. See examples for detail of the dict required. Note that listener keys
are CamelCased. are CamelCased.
required: false required: false
type: list
suboptions:
Port:
description: The port on which the load balancer is listening.
type: int
Protocol:
description: The protocol for connections from clients to the load balancer.
type: str
Certificates:
description: The SSL server certificate.
type: list
suboptions:
CertificateArn:
description: The Amazon Resource Name (ARN) of the certificate.
type: str
SslPolicy:
description: The security policy that defines which ciphers and protocols are supported.
type: str
DefaultActions:
description: The default actions for the listener.
type: list
suboptions:
Type:
description: The type of action.
type: str
TargetGroupArn:
description: The Amazon Resource Name (ARN) of the target group.
type: str
Rules:
type: list
description:
- A list of ALB Listener Rules.
- 'For the complete documentation of possible Conditions and Actions please see the boto3 documentation:'
- 'https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_rule'
suboptions:
Conditions:
type: list
description: Conditions which must be met for the actions to be applied.
Priority:
type: int
description: The rule priority.
Actions:
type: list
description: Actions to apply if all of the rule's conditions are met.
name: name:
description: description:
- The name of the load balancer. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric - The name of the load balancer. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric
characters or hyphens, and must not begin or end with a hyphen. characters or hyphens, and must not begin or end with a hyphen.
required: true required: true
type: str
purge_listeners: purge_listeners:
description: description:
- If yes, existing listeners will be purged from the ELB to match exactly what is defined by I(listeners) parameter. If the I(listeners) parameter is - If yes, existing listeners will be purged from the ELB to match exactly what is defined by I(listeners) parameter. If the I(listeners) parameter is
@ -92,26 +142,31 @@ options:
- A list of the IDs of the subnets to attach to the load balancer. You can specify only one subnet per Availability Zone. You must specify subnets from - A list of the IDs of the subnets to attach to the load balancer. You can specify only one subnet per Availability Zone. You must specify subnets from
at least two Availability Zones. Required if state=present. at least two Availability Zones. Required if state=present.
required: false required: false
type: list
security_groups: security_groups:
description: description:
- A list of the names or IDs of the security groups to assign to the load balancer. Required if state=present. - A list of the names or IDs of the security groups to assign to the load balancer. Required if state=present.
required: false required: false
default: [] default: []
type: list
scheme: scheme:
description: description:
- Internet-facing or internal load balancer. An ELB scheme can not be modified after creation. - Internet-facing or internal load balancer. An ELB scheme can not be modified after creation.
required: false required: false
default: internet-facing default: internet-facing
choices: [ 'internet-facing', 'internal' ] choices: [ 'internet-facing', 'internal' ]
type: str
state: state:
description: description:
- Create or destroy the load balancer. - Create or destroy the load balancer.
default: present default: present
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
type: str
tags: tags:
description: description:
- A dictionary of one or more tags to assign to the load balancer. - A dictionary of one or more tags to assign to the load balancer.
required: false required: false
type: dict
wait: wait:
description: description:
- Wait for the load balancer to have a state of 'active' before completing. A status check is - Wait for the load balancer to have a state of 'active' before completing. A status check is
@ -123,6 +178,7 @@ options:
description: description:
- The time in seconds to use in conjunction with I(wait). - The time in seconds to use in conjunction with I(wait).
version_added: 2.6 version_added: 2.6
type: int
purge_rules: purge_rules:
description: description:
- When set to no, keep the existing load balancer rules in place. Will modify and add, but will not delete. - When set to no, keep the existing load balancer rules in place. Will modify and add, but will not delete.
@ -290,7 +346,7 @@ dns_name:
idle_timeout_timeout_seconds: idle_timeout_timeout_seconds:
description: The idle timeout value, in seconds. description: The idle timeout value, in seconds.
returned: when state is present returned: when state is present
type: str type: int
sample: 60 sample: 60
ip_address_type: ip_address_type:
description: The type of IP addresses used by the subnets for the load balancer. description: The type of IP addresses used by the subnets for the load balancer.

@ -25,10 +25,12 @@ options:
description: description:
- The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call. - The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.
required: false required: false
type: list
names: names:
description: description:
- The names of the load balancers. - The names of the load balancers.
required: false required: false
type: list
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws

@ -27,13 +27,16 @@ options:
- Create or destroy the ELB - Create or destroy the ELB
choices: ["present", "absent"] choices: ["present", "absent"]
required: true required: true
type: str
name: name:
description: description:
- The name of the ELB - The name of the ELB
required: true required: true
type: str
listeners: listeners:
description: description:
- List of ports/protocols for this ELB to listen on (see example) - List of ports/protocols for this ELB to listen on (see example)
type: list
purge_listeners: purge_listeners:
description: description:
- Purge existing listeners on ELB that are not found in listeners - Purge existing listeners on ELB that are not found in listeners
@ -43,6 +46,7 @@ options:
description: description:
- List of instance ids to attach to this ELB - List of instance ids to attach to this ELB
version_added: "2.1" version_added: "2.1"
type: list
purge_instance_ids: purge_instance_ids:
description: description:
- Purge existing instance ids on ELB that are not found in instance_ids - Purge existing instance ids on ELB that are not found in instance_ids
@ -52,6 +56,7 @@ options:
zones: zones:
description: description:
- List of availability zones to enable on this ELB - List of availability zones to enable on this ELB
type: list
purge_zones: purge_zones:
description: description:
- Purge existing availability zones on ELB that are not found in zones - Purge existing availability zones on ELB that are not found in zones
@ -61,21 +66,26 @@ options:
description: description:
- A list of security groups to apply to the elb - A list of security groups to apply to the elb
version_added: "1.6" version_added: "1.6"
type: list
security_group_names: security_group_names:
description: description:
- A list of security group names to apply to the elb - A list of security group names to apply to the elb
version_added: "2.0" version_added: "2.0"
type: list
health_check: health_check:
description: description:
- An associative array of health check configuration settings (see example) - An associative array of health check configuration settings (see example)
type: dict
access_logs: access_logs:
description: description:
- An associative array of access logs configuration settings (see example) - An associative array of access logs configuration settings (see example)
version_added: "2.0" version_added: "2.0"
type: dict
subnets: subnets:
description: description:
- A list of VPC subnets to use when creating ELB. Zones should be empty if using this. - A list of VPC subnets to use when creating ELB. Zones should be empty if using this.
version_added: "1.7" version_added: "1.7"
type: list
purge_subnets: purge_subnets:
description: description:
- Purge existing subnet on ELB that are not found in subnets - Purge existing subnet on ELB that are not found in subnets
@ -90,6 +100,7 @@ options:
choices: ["internal", "internet-facing"] choices: ["internal", "internet-facing"]
default: 'internet-facing' default: 'internet-facing'
version_added: "1.7" version_added: "1.7"
type: str
validate_certs: validate_certs:
description: description:
- When set to C(no), SSL certificates will not be validated for boto versions >= 2.6.0. - When set to C(no), SSL certificates will not be validated for boto versions >= 2.6.0.
@ -100,10 +111,12 @@ options:
description: description:
- Wait a specified timeout allowing connections to drain before terminating an instance - Wait a specified timeout allowing connections to drain before terminating an instance
version_added: "1.8" version_added: "1.8"
type: int
idle_timeout: idle_timeout:
description: description:
- ELB connections from clients and to servers are timed out after this amount of time - ELB connections from clients and to servers are timed out after this amount of time
version_added: "2.0" version_added: "2.0"
type: int
cross_az_load_balancing: cross_az_load_balancing:
description: description:
- Distribute load across all configured Availability Zones - Distribute load across all configured Availability Zones
@ -114,6 +127,7 @@ options:
description: description:
- An associative array of stickiness policy settings. Policy will be applied to all listeners ( see example ) - An associative array of stickiness policy settings. Policy will be applied to all listeners ( see example )
version_added: "2.0" version_added: "2.0"
type: dict
wait: wait:
description: description:
- When specified, Ansible will check the status of the load balancer to ensure it has been successfully - When specified, Ansible will check the status of the load balancer to ensure it has been successfully
@ -127,10 +141,12 @@ options:
A maximum of 600 seconds (10 minutes) is allowed. A maximum of 600 seconds (10 minutes) is allowed.
default: 60 default: 60
version_added: "2.1" version_added: "2.1"
type: int
tags: tags:
description: description:
- An associative array of tags. To delete all tags, supply an empty dict. - An associative array of tags. To delete all tags, supply an empty dict.
version_added: "2.1" version_added: "2.1"
type: dict
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws

@ -13,6 +13,9 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>. # along with this library. If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'], 'status': ['preview'],
'supported_by': 'community'} 'supported_by': 'community'}
@ -33,7 +36,7 @@ options:
names: names:
description: description:
- List of ELB names to gather information about. Pass this option to gather information 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'] type: list
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2

@ -29,13 +29,16 @@ options:
- register or deregister the instance - register or deregister the instance
required: true required: true
choices: ['present', 'absent'] choices: ['present', 'absent']
type: str
instance_id: instance_id:
description: description:
- EC2 Instance ID - EC2 Instance ID
required: true required: true
type: str
ec2_elbs: ec2_elbs:
description: description:
- List of ELB names, required for registration. The ec2_elbs fact should be used if there was a previous de-register. - List of ELB names, required for registration. The ec2_elbs fact should be used if there was a previous de-register.
type: list
enable_availability_zone: enable_availability_zone:
description: description:
- Whether to enable the availability zone of the instance on the target ELB if the availability zone has not already - Whether to enable the availability zone of the instance on the target ELB if the availability zone has not already
@ -59,6 +62,7 @@ options:
If non-zero then any transient errors are ignored until the timeout is reached. Ignored when wait=no. If non-zero then any transient errors are ignored until the timeout is reached. Ignored when wait=no.
default: 0 default: 0
version_added: "1.6" version_added: "1.6"
type: int
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2
@ -317,7 +321,7 @@ class ElbManager:
def main(): def main():
argument_spec = ec2_argument_spec() argument_spec = ec2_argument_spec()
argument_spec.update(dict( argument_spec.update(dict(
state={'required': True}, state={'required': True, 'choices': ['present', 'absent']},
instance_id={'required': True}, instance_id={'required': True},
ec2_elbs={'default': None, 'required': False, 'type': 'list'}, ec2_elbs={'default': None, 'required': False, 'type': 'list'},
enable_availability_zone={'default': True, 'required': False, 'type': 'bool'}, enable_availability_zone={'default': True, 'required': False, 'type': 'bool'},

@ -3,6 +3,9 @@
# Copyright: (c) 2018, Rob White (@wimnat) # Copyright: (c) 2018, Rob White (@wimnat)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'], 'status': ['preview'],
'supported_by': 'community'} 'supported_by': 'community'}
@ -35,11 +38,40 @@ options:
- A list of dicts containing listeners to attach to the ELB. See examples for detail of the dict required. Note that listener keys - A list of dicts containing listeners to attach to the ELB. See examples for detail of the dict required. Note that listener keys
are CamelCased. are CamelCased.
required: false required: false
type: list
suboptions:
Port:
description: The port on which the load balancer is listening.
type: int
Protocol:
description: The protocol for connections from clients to the load balancer.
type: str
Certificates:
description: The SSL server certificate.
type: list
suboptions:
CertificateArn:
description: The Amazon Resource Name (ARN) of the certificate.
type: str
SslPolicy:
description: The security policy that defines which ciphers and protocols are supported.
type: str
DefaultActions:
description: The default actions for the listener.
type: list
suboptions:
Type:
description: The type of action.
type: str
TargetGroupArn:
description: The Amazon Resource Name (ARN) of the target group.
type: str
name: name:
description: description:
- The name of the load balancer. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric - The name of the load balancer. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric
characters or hyphens, and must not begin or end with a hyphen. characters or hyphens, and must not begin or end with a hyphen.
required: true required: true
type: str
purge_listeners: purge_listeners:
description: description:
- If yes, existing listeners will be purged from the ELB to match exactly what is defined by I(listeners) parameter. If the I(listeners) parameter is - If yes, existing listeners will be purged from the ELB to match exactly what is defined by I(listeners) parameter. If the I(listeners) parameter is
@ -58,26 +90,31 @@ options:
- A list of dicts containing the IDs of the subnets to attach to the load balancer. You can also specify the allocation ID of an Elastic IP - A list of dicts containing the IDs of the subnets to attach to the load balancer. You can also specify the allocation ID of an Elastic IP
to attach to the load balancer. You can specify one Elastic IP address per subnet. This parameter is mutually exclusive with I(subnets) to attach to the load balancer. You can specify one Elastic IP address per subnet. This parameter is mutually exclusive with I(subnets)
required: false required: false
type: list
subnets: subnets:
description: description:
- A list of the IDs of the subnets to attach to the load balancer. You can specify only one subnet per Availability Zone. You must specify subnets from - A list of the IDs of the subnets to attach to the load balancer. You can specify only one subnet per Availability Zone. You must specify subnets from
at least two Availability Zones. Required if state=present. This parameter is mutually exclusive with I(subnet_mappings) at least two Availability Zones. Required if state=present. This parameter is mutually exclusive with I(subnet_mappings)
required: false required: false
type: list
scheme: scheme:
description: description:
- Internet-facing or internal load balancer. An ELB scheme can not be modified after creation. - Internet-facing or internal load balancer. An ELB scheme can not be modified after creation.
required: false required: false
default: internet-facing default: internet-facing
choices: [ 'internet-facing', 'internal' ] choices: [ 'internet-facing', 'internal' ]
type: str
state: state:
description: description:
- Create or destroy the load balancer. - Create or destroy the load balancer.
required: true required: true
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
type: str
tags: tags:
description: description:
- A dictionary of one or more tags to assign to the load balancer. - A dictionary of one or more tags to assign to the load balancer.
required: false required: false
type: dict
wait: wait:
description: description:
- Whether or not to wait for the network load balancer to reach the desired state. - Whether or not to wait for the network load balancer to reach the desired state.
@ -85,6 +122,7 @@ options:
wait_timeout: wait_timeout:
description: description:
- The duration in seconds to wait, used in conjunction with I(wait). - The duration in seconds to wait, used in conjunction with I(wait).
type: int
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2

@ -2,6 +2,9 @@
# Copyright (c) 2017 Ansible Project # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'status': ['preview'], ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community', 'supported_by': 'community',
'metadata_version': '1.1'} 'metadata_version': '1.1'}
@ -25,38 +28,46 @@ options:
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified - An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified
Availability Zone or from all enabled Availability Zones for the load balancer. This parameter is not supported if the target Availability Zone or from all enabled Availability Zones for the load balancer. This parameter is not supported if the target
type of the target group is instance. type of the target group is instance.
type: str
target_group_arn: target_group_arn:
description: description:
- The Amazon Resource Name (ARN) of the target group. Mutually exclusive of I(target_group_name). - The Amazon Resource Name (ARN) of the target group. Mutually exclusive of I(target_group_name).
type: str
target_group_name: target_group_name:
description: description:
- The name of the target group. Mutually exclusive of I(target_group_arn). - The name of the target group. Mutually exclusive of I(target_group_arn).
type: str
target_id: target_id:
description: description:
- The ID of the target. - The ID of the target.
required: true required: true
type: str
target_port: target_port:
description: description:
- The port on which the target is listening. You can specify a port override. If a target is already registered, - The port on which the target is listening. You can specify a port override. If a target is already registered,
you can register it again using a different port. you can register it again using a different port.
- The default port for a target is the port for the target group.
required: false required: false
default: The default port for a target is the port for the target group. type: int
target_status: target_status:
description: description:
- Blocks and waits for the target status to equal given value. For more detail on target status see - Blocks and waits for the target status to equal given value. For more detail on target status see
U(https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html#target-health-states) U(https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html#target-health-states)
required: false required: false
choices: [ 'initial', 'healthy', 'unhealthy', 'unused', 'draining', 'unavailable' ] choices: [ 'initial', 'healthy', 'unhealthy', 'unused', 'draining', 'unavailable' ]
type: str
target_status_timeout: target_status_timeout:
description: description:
- Maximum time in seconds to wait for target_status change - Maximum time in seconds to wait for target_status change
required: false required: false
default: 60 default: 60
type: int
state: state:
description: description:
- Register or deregister the target. - Register or deregister the target.
required: true required: true
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
type: str
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2

@ -26,33 +26,40 @@ options:
description: description:
- The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. - The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused.
The range is 0-3600 seconds. The range is 0-3600 seconds.
type: int
health_check_protocol: health_check_protocol:
description: description:
- The protocol the load balancer uses when performing health checks on targets. - The protocol the load balancer uses when performing health checks on targets.
required: false required: false
choices: [ 'http', 'https', 'tcp' ] choices: [ 'http', 'https', 'tcp', 'HTTP', 'HTTPS', 'TCP' ]
type: str
health_check_port: health_check_port:
description: description:
- The port the load balancer uses when performing health checks on targets. - The port the load balancer uses when performing health checks on targets.
Can be set to 'traffic-port' to match target port. Can be set to 'traffic-port' to match target port.
- When not defined will default to the port on which each target receives traffic from the load balancer.
required: false required: false
default: "The port on which each target receives traffic from the load balancer." type: str
health_check_path: health_check_path:
description: description:
- The ping path that is the destination on the targets for health checks. The path must be defined in order to set a health check. - The ping path that is the destination on the targets for health checks. The path must be defined in order to set a health check.
required: false required: false
type: str
health_check_interval: health_check_interval:
description: description:
- The approximate amount of time, in seconds, between health checks of an individual target. - The approximate amount of time, in seconds, between health checks of an individual target.
required: false required: false
type: int
health_check_timeout: health_check_timeout:
description: description:
- The amount of time, in seconds, during which no response from a target means a failed health check. - The amount of time, in seconds, during which no response from a target means a failed health check.
required: false required: false
type: int
healthy_threshold_count: healthy_threshold_count:
description: description:
- The number of consecutive health checks successes required before considering an unhealthy target healthy. - The number of consecutive health checks successes required before considering an unhealthy target healthy.
required: false required: false
type: int
modify_targets: modify_targets:
description: description:
- Whether or not to alter existing targets in the group to match what is passed with the module - Whether or not to alter existing targets in the group to match what is passed with the module
@ -63,16 +70,19 @@ options:
description: description:
- The name of the target group. - The name of the target group.
required: true required: true
type: str
port: port:
description: description:
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. Required if - The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. Required if
I(state) is C(present). I(state) is C(present).
required: false required: false
type: int
protocol: protocol:
description: description:
- The protocol to use for routing traffic to the targets. Required when I(state) is C(present). - The protocol to use for routing traffic to the targets. Required when I(state) is C(present).
required: false required: false
choices: [ 'http', 'https', 'tcp' ] choices: [ 'http', 'https', 'tcp', 'HTTP', 'HTTPS', 'TCP']
type: str
purge_tags: purge_tags:
description: description:
- If yes, existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. If the tag parameter is not set then - If yes, existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. If the tag parameter is not set then
@ -85,6 +95,7 @@ options:
- Create or destroy the target group. - Create or destroy the target group.
required: true required: true
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
type: str
stickiness_enabled: stickiness_enabled:
description: description:
- Indicates whether sticky sessions are enabled. - Indicates whether sticky sessions are enabled.
@ -93,20 +104,24 @@ options:
description: description:
- The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load
balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds).
type: int
stickiness_type: stickiness_type:
description: description:
- The type of sticky sessions. The possible value is lb_cookie. - The type of sticky sessions. The possible value is lb_cookie.
default: lb_cookie default: lb_cookie
type: str
successful_response_codes: successful_response_codes:
description: description:
- The HTTP codes to use when checking for a successful response from a target. - The HTTP codes to use when checking for a successful response from a target.
- Accepts multiple values (for example, "200,202") or a range of values (for example, "200-299"). - Accepts multiple values (for example, "200,202") or a range of values (for example, "200-299").
- Requires the I(health_check_protocol) parameter to be set. - Requires the I(health_check_protocol) parameter to be set.
required: false required: false
type: str
tags: tags:
description: description:
- A dictionary of one or more tags to assign to the target group. - A dictionary of one or more tags to assign to the target group.
required: false required: false
type: dict
target_type: target_type:
description: description:
- The type of target that you must specify when registering targets with this target group. The possible values are - The type of target that you must specify when registering targets with this target group. The possible values are
@ -120,19 +135,23 @@ options:
default: instance default: instance
choices: ['instance', 'ip', 'lambda'] choices: ['instance', 'ip', 'lambda']
version_added: 2.5 version_added: 2.5
type: str
targets: targets:
description: description:
- A list of targets to assign to the target group. This parameter defaults to an empty list. Unless you set the 'modify_targets' parameter then - A list of targets to assign to the target group. This parameter defaults to an empty list. Unless you set the 'modify_targets' parameter then
all existing targets will be removed from the group. The list should be an Id and a Port parameter. See the Examples for detail. all existing targets will be removed from the group. The list should be an Id and a Port parameter. See the Examples for detail.
required: false required: false
type: list
unhealthy_threshold_count: unhealthy_threshold_count:
description: description:
- The number of consecutive health check failures required before considering a target unhealthy. - The number of consecutive health check failures required before considering a target unhealthy.
required: false required: false
type: int
vpc_id: vpc_id:
description: description:
- The identifier of the virtual private cloud (VPC). Required when I(state) is C(present). - The identifier of the virtual private cloud (VPC). Required when I(state) is C(present).
required: false required: false
type: str
wait: wait:
description: description:
- Whether or not to wait for the target group. - Whether or not to wait for the target group.
@ -144,6 +163,7 @@ options:
- The time to wait for the target group. - The time to wait for the target group.
default: 200 default: 200
version_added: "2.4" version_added: "2.4"
type: int
extends_documentation_fragment: extends_documentation_fragment:
- aws - aws
- ec2 - ec2

@ -25,14 +25,17 @@ options:
description: description:
- The Amazon Resource Name (ARN) of the load balancer. - The Amazon Resource Name (ARN) of the load balancer.
required: false required: false
type: str
target_group_arns: target_group_arns:
description: description:
- The Amazon Resource Names (ARN) of the target groups. - The Amazon Resource Names (ARN) of the target groups.
required: false required: false
type: list
names: names:
description: description:
- The names of the target groups. - The names of the target groups.
required: false required: false
type: list
collect_targets_health: collect_targets_health:
description: description:
- When set to "yes", output contains targets health description - When set to "yes", output contains targets health description

@ -191,11 +191,13 @@ instance_target_groups:
returned: if I(state!=present) returned: if I(state!=present)
sample: sample:
- "Target desregistration is in progress" - "Target desregistration is in progress"
type: str
reason: reason:
description: reason code for target health description: reason code for target health
returned: if I(state!=healthy) returned: if I(state!=healthy)
sample: sample:
- "Target.Deregistration in progress" - "Target.Deregistration in progress"
type: str
state: state:
description: health state description: health state
returned: always returned: always
@ -206,6 +208,7 @@ instance_target_groups:
- "unhealthy" - "unhealthy"
- "unused" - "unused"
- "unavailable" - "unavailable"
type: str
""" """
__metaclass__ = type __metaclass__ = type

@ -730,13 +730,6 @@ lib/ansible/modules/cloud/amazon/ec2_eip.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/ec2_eip_info.py future-import-boilerplate lib/ansible/modules/cloud/amazon/ec2_eip_info.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/ec2_eip_info.py metaclass-boilerplate lib/ansible/modules/cloud/amazon/ec2_eip_info.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/ec2_eip_info.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/cloud/amazon/ec2_eip_info.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/ec2_elb.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/cloud/amazon/ec2_elb.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/ec2_elb.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/ec2_elb_info.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/ec2_elb_info.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/ec2_elb_info.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/cloud/amazon/ec2_elb_info.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/ec2_eni.py future-import-boilerplate lib/ansible/modules/cloud/amazon/ec2_eni.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/ec2_eni.py metaclass-boilerplate lib/ansible/modules/cloud/amazon/ec2_eni.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/ec2_eni.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/cloud/amazon/ec2_eni.py validate-modules:parameter-type-not-in-doc
@ -898,39 +891,6 @@ lib/ansible/modules/cloud/amazon/elasticache_snapshot.py validate-modules:parame
lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py validate-modules:doc-missing-type lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/elb_application_lb.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/elb_application_lb.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/elb_application_lb.py validate-modules:undocumented-parameter
lib/ansible/modules/cloud/amazon/elb_application_lb.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/cloud/amazon/elb_application_lb.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_application_lb.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/elb_application_lb.py validate-modules:missing-suboption-docs
lib/ansible/modules/cloud/amazon/elb_application_lb_info.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_classic_lb.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_classic_lb.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/elb_classic_lb_info.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/elb_classic_lb_info.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/elb_classic_lb_info.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/cloud/amazon/elb_classic_lb_info.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_instance.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/cloud/amazon/elb_instance.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_instance.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/elb_network_lb.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/elb_network_lb.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/elb_network_lb.py validate-modules:undocumented-parameter
lib/ansible/modules/cloud/amazon/elb_network_lb.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_network_lb.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/elb_network_lb.py validate-modules:missing-suboption-docs
lib/ansible/modules/cloud/amazon/elb_target.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/elb_target.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/elb_target.py validate-modules:doc-default-incompatible-type
lib/ansible/modules/cloud/amazon/elb_target.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_target_group.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/cloud/amazon/elb_target_group.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/cloud/amazon/elb_target_group.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_target_group.py validate-modules:doc-missing-type
lib/ansible/modules/cloud/amazon/elb_target_group_info.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/amazon/elb_target_info.py validate-modules:return-syntax-error
lib/ansible/modules/cloud/amazon/execute_lambda.py future-import-boilerplate lib/ansible/modules/cloud/amazon/execute_lambda.py future-import-boilerplate
lib/ansible/modules/cloud/amazon/execute_lambda.py metaclass-boilerplate lib/ansible/modules/cloud/amazon/execute_lambda.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/execute_lambda.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/cloud/amazon/execute_lambda.py validate-modules:doc-default-does-not-match-spec

Loading…
Cancel
Save