elb_instance
De-registers or registers instances from EC2 ELBs
Collection: community.aws
Full Name: community.aws.elb_instance
Synopsis
De-registers or registers instances from EC2 ELBs
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| debug_botocore_endpoint_logs | bool | false | ||
| ec2_elbs | list | |||
| enable_availability_zone | bool | true | ||
| endpoint_url | str | |||
| instance_id | str | yes | ||
| profile | str | |||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | yes | ||
| validate_certs | bool | true | ||
| wait | bool | true | ||
| wait_timeout | int | 0 |
Example
yaml
- name: Instance De-register
community.aws.elb_instance:
instance_id: "{{ ansible_ec2_instance_id }}"
state: absent
register: deregister_instances
delegate_to: localhost
- name: Instance Register
community.aws.elb_instance:
instance_id: "{{ ansible_ec2_instance_id }}"
ec2_elbs: "{{ deregister_instances.updated_elbs }}"
state: present
delegate_to: localhost