From 2a68bc0c29622b5ef314195d80f1337f1a990a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 19 Sep 2019 17:03:47 -0400 Subject: [PATCH] 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`. See: #61938 Original PR: https://github.com/ansible/ansible/pull/62627 (cherry picked from commit cee55ab7187df23ffa3c577ab1cbe15334cb38fa) --- test/integration/targets/mongodb_replicaset/tasks/main.yml | 2 +- .../targets/mongodb_replicaset/tasks/mongod_replicaset.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/targets/mongodb_replicaset/tasks/main.yml b/test/integration/targets/mongodb_replicaset/tasks/main.yml index d416bfc84ed..2e45a2855e6 100644 --- a/test/integration/targets/mongodb_replicaset/tasks/main.yml +++ b/test/integration/targets/mongodb_replicaset/tasks/main.yml @@ -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 }}" diff --git a/test/integration/targets/mongodb_replicaset/tasks/mongod_replicaset.yml b/test/integration/targets/mongodb_replicaset/tasks/mongod_replicaset.yml index 9ad3bb14964..f33d93f4ac2 100644 --- a/test/integration/targets/mongodb_replicaset/tasks/mongod_replicaset.yml +++ b/test/integration/targets/mongodb_replicaset/tasks/mongod_replicaset.yml @@ -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: