forked from ansible-collections/community.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ansible-collections#499 from abikouo/elbv2_ipaddress
update elb_xxxx module adding ip_address_type option Reviewed-by: https://github.com/apps/ansible-zuul
- Loading branch information
Showing
16 changed files
with
541 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
minor_changes: | ||
- elb_application_lb - added ``ip_address_type`` parameter to support changing application load balancer configuration (https://github.com/ansible-collections/community.aws/pull/499). | ||
- elb_network_lb - added ``ip_address_type`` parameter to support changing network load balancer configuration (https://github.com/ansible-collections/community.aws/pull/499). | ||
- elb_application_lb_info - added ``ip_address_type`` in output when gathering application load balancer parameters (https://github.com/ansible-collections/community.aws/pull/499). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
tests/integration/targets/elb_application_lb/tasks/test_alb_ip_address_type_options.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
- block: | ||
- name: set elb name for ipv6 | ||
set_fact: | ||
elb_name_ipv6: "{{ alb_name ~ 'ipv6' }}" | ||
|
||
- name: test creating an ELB with invalid ip address type | ||
elb_application_lb: | ||
name: "{{ elb_name_ipv6 }}" | ||
subnets: "{{ alb_subnets }}" | ||
security_groups: "{{ sec_group.group_id }}" | ||
state: present | ||
listeners: | ||
- Protocol: HTTP | ||
Port: 80 | ||
DefaultActions: | ||
- Type: forward | ||
TargetGroupName: "{{ tg_name }}" | ||
ip_address_type: "ip_addr_v4_v6" | ||
ignore_errors: yes | ||
register: elb | ||
|
||
- assert: | ||
that: | ||
- elb is failed | ||
|
||
- name: test creating an ELB with dualstack ip adress type | ||
elb_application_lb: | ||
name: "{{ elb_name_ipv6 }}" | ||
subnets: "{{ alb_subnets }}" | ||
security_groups: "{{ sec_group.group_id }}" | ||
state: present | ||
listeners: | ||
- Protocol: HTTP | ||
Port: 80 | ||
DefaultActions: | ||
- Type: forward | ||
TargetGroupName: "{{ tg_name }}" | ||
ip_address_type: "dualstack" | ||
register: elb | ||
|
||
- assert: | ||
that: | ||
- elb.ip_address_type == "dualstack" | ||
|
||
- name: test updating an ELB with ipv4 adress type | ||
elb_application_lb: | ||
name: "{{ elb_name_ipv6 }}" | ||
subnets: "{{ alb_subnets }}" | ||
security_groups: "{{ sec_group.group_id }}" | ||
state: present | ||
listeners: | ||
- Protocol: HTTP | ||
Port: 80 | ||
DefaultActions: | ||
- Type: forward | ||
TargetGroupName: "{{ tg_name }}" | ||
ip_address_type: "ipv4" | ||
register: elb | ||
|
||
- assert: | ||
that: | ||
- elb.changed | ||
- elb.ip_address_type == "ipv4" | ||
|
||
- name: test idempotence updating an ELB with ipv4 adress type | ||
elb_application_lb: | ||
name: "{{ elb_name_ipv6 }}" | ||
subnets: "{{ alb_subnets }}" | ||
security_groups: "{{ sec_group.group_id }}" | ||
state: present | ||
listeners: | ||
- Protocol: HTTP | ||
Port: 80 | ||
DefaultActions: | ||
- Type: forward | ||
TargetGroupName: "{{ tg_name }}" | ||
ip_address_type: "ipv4" | ||
register: elb | ||
|
||
- assert: | ||
that: | ||
- not elb.changed | ||
- elb.ip_address_type == "ipv4" | ||
|
||
always: | ||
# Cleanup | ||
- name: destroy ALB if created | ||
elb_application_lb: | ||
name: '{{ elb_name_ipv6 }}' | ||
state: absent | ||
wait: true | ||
wait_timeout: 600 | ||
ignore_errors: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/aws | ||
shippable/aws/group2 |
4 changes: 4 additions & 0 deletions
4
tests/integration/targets/elb_application_lb_info/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
resource_short: "{{ '%0.8x'%((16**8) | random(seed=resource_prefix)) }}" | ||
alb_name: "alb-test-{{ resource_short }}" | ||
tg_name: "alb-test-{{ resource_short }}" |
2 changes: 2 additions & 0 deletions
2
tests/integration/targets/elb_application_lb_info/meta/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
- setup_remote_tmp_dir |
Oops, something went wrong.