ansible/test/integration/targets/mongodb_user/tasks/mongod_teardown.yml
Rhys Campbell 609c3d0e36 mongodb_user module integration tests (#61257)
* Add final commits

* End of night commit

* Add further tests

* What is this doing here?

* Remove file from commit

* Change os check

* Change version check
2020-01-09 09:22:45 -05:00

27 lines
593 B
YAML

- name: Kill all mongod processes
command: pkill -{{ kill_signal }} mongod
ignore_errors: true
- name: Getting pids for mongod
pids:
name: mongod
register: pids_of_mongod
- name: Wait for all mongod processes to exit
wait_for:
path: "/proc/{{ item }}/status"
state: absent
delay: 1
with_items: "{{ pids_of_mongod }}"
- name: Remove all mongod folders
file:
path: "{{ remote_tmp_dir }}/{{ item }}"
state: absent
with_items:
- mongod3001
- mongod3002
- mongod3003
- name: Remove all mongod sock files
shell: rm -Rf /tmp/mongodb*.sock