mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-10 11:50:18 +01:00
add wait_for option to check for webserver uptime before haproxy enables
This commit is contained in:
parent
e70021064c
commit
235f41aa39
1 changed files with 5 additions and 2 deletions
|
@ -34,6 +34,9 @@
|
|||
|
||||
# These tasks run after the roles:
|
||||
post_tasks:
|
||||
- name: Wait for webserver to come up
|
||||
wait_for: host={{ inventory_hostname }} port=80 state=started timeout=80s
|
||||
|
||||
- name: Enable the server in haproxy
|
||||
shell: echo "enable server myapplb/{{ ansible_hostname }}" | socat stdio /var/lib/haproxy/stats
|
||||
delegate_to: "{{ item }}"
|
||||
|
|
Loading…
Reference in a new issue