Merge "Fix checking mongodb replication status"

This commit is contained in:
Zuul 2019-08-05 09:02:05 +00:00 committed by Gerrit Code Review
commit 5760cc226b

View File

@ -17,6 +17,7 @@
notify: notify:
- Waiting for the mongodb startup - Waiting for the mongodb startup
- Checking current replication status - Checking current replication status
- Bootstrap cluster
- name: Waiting for the mongodb startup - name: Waiting for the mongodb startup
wait_for: host={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} port={{ mongodb_port }} wait_for: host={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} port={{ mongodb_port }}
@ -29,5 +30,6 @@
delegate_to: "{{ groups['mongodb'][0] }}" delegate_to: "{{ groups['mongodb'][0] }}"
run_once: True run_once: True
- include_tasks: "bootstrap_cluster.yml" - name: Bootstrap cluster
include_tasks: "bootstrap_cluster.yml"
when: mongodb_replication_status.stdout != "1" when: mongodb_replication_status.stdout != "1"