mongodb_replicaset/test: properly kill the nodes

The `pids` module returns the list of the PID in a `pids` key.

This change ensures we correctly wait for the end of the previous mongod
instances before we start the next ones.

In addition, we remove an unnecessary `ignore_errors`.
pull/62632/head
Gonéri Le Bouder 5 years ago
parent 85eba9d860
commit cee55ab718

@ -89,7 +89,7 @@
wait_for: wait_for:
path: "/proc/{{ item }}/status" path: "/proc/{{ item }}/status"
state: absent state: absent
with_items: "{{ pids_of_mongod }}" with_items: "{{ pids_of_mongod.pids }}"
- set_fact: - set_fact:
current_replicaset: "{{ mongodb_replicaset1 }}" current_replicaset: "{{ mongodb_replicaset1 }}"

@ -36,7 +36,6 @@
chdir: "{{ remote_tmp_dir }}" chdir: "{{ remote_tmp_dir }}"
with_items: "{{ mongodb_nodes | sort }}" with_items: "{{ mongodb_nodes | sort }}"
when: mongod_auth == True when: mongod_auth == True
ignore_errors: yes
- name: Wait for mongod to start responding - name: Wait for mongod to start responding
wait_for: wait_for:

Loading…
Cancel
Save