Stack status
This commit is contained in:
@@ -26,6 +26,26 @@
|
|||||||
- name: verify mysql is listening on 3306
|
- name: verify mysql is listening on 3306
|
||||||
wait_for: port=3306 timeout=1
|
wait_for: port=3306 timeout=1
|
||||||
|
|
||||||
|
- hosts: loadbalancer
|
||||||
|
tasks:
|
||||||
|
- name: verify backend index response
|
||||||
|
uri: url=http://{{item}} return_content=yes
|
||||||
|
loop: "{{ groups.webserver }}"
|
||||||
|
register: app_index
|
||||||
|
|
||||||
|
- fail: msg="index failed to return content"
|
||||||
|
when: "'Hello, from sunny {{item.item}}!' not in item.content"
|
||||||
|
loop: "{{app_index.results}}"
|
||||||
|
|
||||||
|
- name: verify backend db response
|
||||||
|
uri: url=http://{{item}}/db return_content=yes
|
||||||
|
loop: "{{ groups.webserver }}"
|
||||||
|
register: app_db
|
||||||
|
|
||||||
|
- fail: msg="db failed to return content"
|
||||||
|
when: "'Database Connected from {{item.item}}!' not in item.content"
|
||||||
|
loop: "{{app_db.results}}"
|
||||||
|
|
||||||
- hosts: control
|
- hosts: control
|
||||||
tasks:
|
tasks:
|
||||||
- name: get elements from loadbalancer group
|
- name: get elements from loadbalancer group
|
||||||
@@ -47,24 +67,4 @@
|
|||||||
|
|
||||||
- fail: msg="db failed to return content"
|
- fail: msg="db failed to return content"
|
||||||
when: "'Database Connected from' not in item.content"
|
when: "'Database Connected from' not in item.content"
|
||||||
loop: "{{lb_db.results}}"
|
loop: "{{lb_db.results}}"
|
||||||
|
|
||||||
- hosts: loadbalancer
|
|
||||||
tasks:
|
|
||||||
- name: verify backend index response
|
|
||||||
uri: url=http://{{item}} return_content=yes
|
|
||||||
loop: "{{ groups.webserver }}"
|
|
||||||
register: app_index
|
|
||||||
|
|
||||||
- fail: msg="index failed to return content"
|
|
||||||
when: "'Hello, from sunny {{item.item}}!' not in item.content"
|
|
||||||
loop: "{{app_index.results}}"
|
|
||||||
|
|
||||||
- name: verify backend db response
|
|
||||||
uri: url=http://{{item}}/db return_content=yes
|
|
||||||
loop: "{{ groups.webserver }}"
|
|
||||||
register: app_db
|
|
||||||
|
|
||||||
- fail: msg="db failed to return content"
|
|
||||||
when: "'Database Connected from {{item.item}}!' not in item.content"
|
|
||||||
loop: "{{app_db.results}}"
|
|
||||||
Reference in New Issue
Block a user