|
|
@ -41,11 +41,9 @@
|
|
|
|
- protocol: http
|
|
|
|
- protocol: http
|
|
|
|
load_balancer_port: 80
|
|
|
|
load_balancer_port: 80
|
|
|
|
instance_port: 80
|
|
|
|
instance_port: 80
|
|
|
|
- protocol: https
|
|
|
|
- protocol: http
|
|
|
|
load_balancer_port: 443
|
|
|
|
load_balancer_port: 8080
|
|
|
|
instance_protocol: http
|
|
|
|
instance_port: 8080
|
|
|
|
instance_port: 80
|
|
|
|
|
|
|
|
ssl_certificate_id: "{{ elb_lb_cert }}"
|
|
|
|
|
|
|
|
health_check:
|
|
|
|
health_check:
|
|
|
|
ping_protocol: http
|
|
|
|
ping_protocol: http
|
|
|
|
ping_port: 80
|
|
|
|
ping_port: 80
|
|
|
@ -68,15 +66,9 @@
|
|
|
|
- 'info.elb.health_check.target == "HTTP:80/index.html"'
|
|
|
|
- 'info.elb.health_check.target == "HTTP:80/index.html"'
|
|
|
|
- 'info.elb.health_check.timeout == 5'
|
|
|
|
- 'info.elb.health_check.timeout == 5'
|
|
|
|
- 'info.elb.health_check.unhealthy_threshold == 2'
|
|
|
|
- 'info.elb.health_check.unhealthy_threshold == 2'
|
|
|
|
- 'info.elb.listeners[0][0] == 80'
|
|
|
|
- '[80, 80, "HTTP", "HTTP"] in info.elb.listeners'
|
|
|
|
- 'info.elb.listeners[0][1] == 80'
|
|
|
|
- '[8080, 8080, "HTTP", "HTTP"] in info.elb.listeners'
|
|
|
|
- 'info.elb.listeners[0][2] == "HTTP"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[0][3] == "HTTP"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][0] == 443'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][1] == 80'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][2] == "HTTPS"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][3] == "HTTP"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][4] == "{{ elb_lb_cert }}"'
|
|
|
|
|
|
|
|
# ============================================================
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
|
|
|
|
# check ports, would be cool, but we are at the mercy of AWS
|
|
|
|
# check ports, would be cool, but we are at the mercy of AWS
|
|
|
@ -113,11 +105,6 @@
|
|
|
|
- protocol: http
|
|
|
|
- protocol: http
|
|
|
|
load_balancer_port: 80
|
|
|
|
load_balancer_port: 80
|
|
|
|
instance_port: 80
|
|
|
|
instance_port: 80
|
|
|
|
- protocol: https
|
|
|
|
|
|
|
|
load_balancer_port: 443
|
|
|
|
|
|
|
|
instance_protocol: http
|
|
|
|
|
|
|
|
instance_port: 80
|
|
|
|
|
|
|
|
ssl_certificate_id: "{{ elb_lb_cert }}"
|
|
|
|
|
|
|
|
purge_zones: yes
|
|
|
|
purge_zones: yes
|
|
|
|
health_check:
|
|
|
|
health_check:
|
|
|
|
ping_protocol: http
|
|
|
|
ping_protocol: http
|
|
|
@ -157,11 +144,6 @@
|
|
|
|
- protocol: http
|
|
|
|
- protocol: http
|
|
|
|
load_balancer_port: 80
|
|
|
|
load_balancer_port: 80
|
|
|
|
instance_port: 80
|
|
|
|
instance_port: 80
|
|
|
|
- protocol: https
|
|
|
|
|
|
|
|
load_balancer_port: 443
|
|
|
|
|
|
|
|
instance_protocol: http
|
|
|
|
|
|
|
|
instance_port: 80
|
|
|
|
|
|
|
|
ssl_certificate_id: "{{ elb_lb_cert }}"
|
|
|
|
|
|
|
|
purge_zones: yes
|
|
|
|
purge_zones: yes
|
|
|
|
register: info
|
|
|
|
register: info
|
|
|
|
|
|
|
|
|
|
|
@ -170,9 +152,9 @@
|
|
|
|
- '"failed" not in info'
|
|
|
|
- '"failed" not in info'
|
|
|
|
- 'info.changed'
|
|
|
|
- 'info.changed'
|
|
|
|
- 'info.elb.status == "ok"'
|
|
|
|
- 'info.elb.status == "ok"'
|
|
|
|
- 'info.elb.zones[0] == "us-east-1b"'
|
|
|
|
- '"us-east-1b" in info.elb.zones'
|
|
|
|
- 'info.elb.zones[1] == "us-east-1c"'
|
|
|
|
- '"us-east-1c" in info.elb.zones'
|
|
|
|
- 'info.elb.zones[2] == "us-east-1d"'
|
|
|
|
- '"us-east-1d" in info.elb.zones'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================================
|
|
|
|
# ============================================================
|
|
|
@ -202,9 +184,8 @@
|
|
|
|
- '"failed" not in info'
|
|
|
|
- '"failed" not in info'
|
|
|
|
- 'info.elb.status == "ok"'
|
|
|
|
- 'info.elb.status == "ok"'
|
|
|
|
- 'info.changed'
|
|
|
|
- 'info.changed'
|
|
|
|
- 'info.elb.listeners[0][0] == 80'
|
|
|
|
- '[80, 81, "HTTP", "HTTP"] in info.elb.listeners'
|
|
|
|
- 'info.elb.listeners[0][1] == 81'
|
|
|
|
- 'info.elb.listeners|length == 1'
|
|
|
|
- 'len(info.elb.listeners) == 1'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -225,14 +206,9 @@
|
|
|
|
- us-east-1d
|
|
|
|
- us-east-1d
|
|
|
|
listeners:
|
|
|
|
listeners:
|
|
|
|
- protocol: http
|
|
|
|
- protocol: http
|
|
|
|
load_balancer_port: 80
|
|
|
|
load_balancer_port: 8081
|
|
|
|
instance_port: 81
|
|
|
|
instance_port: 8081
|
|
|
|
- protocol: https
|
|
|
|
purge_listeners: no
|
|
|
|
load_balancer_port: 443
|
|
|
|
|
|
|
|
instance_protocol: http
|
|
|
|
|
|
|
|
instance_port: 80
|
|
|
|
|
|
|
|
ssl_certificate_id: "{{ elb_lb_cert }}"
|
|
|
|
|
|
|
|
purge_listeners: yes
|
|
|
|
|
|
|
|
register: info
|
|
|
|
register: info
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
@ -240,16 +216,9 @@
|
|
|
|
- '"failed" not in info'
|
|
|
|
- '"failed" not in info'
|
|
|
|
- 'info.elb.status == "ok"'
|
|
|
|
- 'info.elb.status == "ok"'
|
|
|
|
- 'info.changed'
|
|
|
|
- 'info.changed'
|
|
|
|
- 'info.elb.listeners[0][0] == 80'
|
|
|
|
- '[80, 81, "HTTP", "HTTP"] in info.elb.listeners'
|
|
|
|
- 'info.elb.listeners[0][1] == 80'
|
|
|
|
- '[8081, 8081, "HTTP", "HTTP"] in info.elb.listeners'
|
|
|
|
- 'info.elb.listeners[0][2] == "HTTP"'
|
|
|
|
- 'info.elb.listeners|length == 2'
|
|
|
|
- 'info.elb.listeners[0][3] == "HTTP"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][0] == 443'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][1] == 80'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][2] == "HTTPS"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][3] == "HTTP"'
|
|
|
|
|
|
|
|
- 'info.elb.listeners[1][4] == "{{ elb_lb_cert }}"'
|
|
|
|
|
|
|
|
- 'len(info.elb.listeners) == 2'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================================
|
|
|
|
# ============================================================
|
|
|
@ -419,3 +388,21 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- 'result.failed'
|
|
|
|
- 'result.failed'
|
|
|
|
- '"No handler was ready to authenticate. 1 handlers were checked." in result.msg'
|
|
|
|
- '"No handler was ready to authenticate. 1 handlers were checked." in result.msg'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
- name: remove the test load balancer completely
|
|
|
|
|
|
|
|
ec2_elb_lb:
|
|
|
|
|
|
|
|
name: "{{ tag_prefix }}"
|
|
|
|
|
|
|
|
region: "{{ ec2_region }}"
|
|
|
|
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
ec2_access_key: "{{ ec2_access_key }}"
|
|
|
|
|
|
|
|
ec2_secret_key: "{{ ec2_secret_key }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: assert the load balancer was removed
|
|
|
|
|
|
|
|
assert:
|
|
|
|
|
|
|
|
that:
|
|
|
|
|
|
|
|
- 'result.changed'
|
|
|
|
|
|
|
|
- 'result.elb.name == "{{tag_prefix}}"'
|
|
|
|
|
|
|
|
- 'result.elb.status == "deleted"'
|
|
|
|
|
|
|
|
|
|
|
|