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`.
This commit is contained in:
Gonéri Le Bouder 2019-09-19 17:03:47 -04:00
parent 85eba9d860
commit cee55ab718
2 changed files with 1 additions and 2 deletions

View file

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

View file

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