Skip to content

Commit

Permalink
Wait until master is available when setting up slave
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkza committed Nov 24, 2016
1 parent 49f2a2b commit aa6779e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tasks/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@
- name: flush handlers to apply config changes
meta: flush_handlers

- name: wait for master to start
wait_for:
host: "{{ redis_slaveof.split()[0] }}"
port: "{{ redis_slaveof.split()[1] }}"
timeout: 30
when: redis_slaveof is defined and redis_slaveof

- name: ensure redis is running
service:
name: "{{ redis_service_name }}"
Expand Down

0 comments on commit aa6779e

Please sign in to comment.