community.mongodb.mongodb_shutdown – Cleans up all database resources and then terminates the mongod/mongos process.
This plugin is part of the community.mongodb collection (version 1.3.2).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install community.mongodb.
To use it in a playbook, specify:
New in version 1.0.0: of community.mongodb
Requires the pymongo Python package on the remote host, version 2.4.2+. This can be installed using pip or the OS package manager. @see http://api.mongodb.org/python/current/installation.html
- name: Attempt to perform a clean shutdown community.mongodb.mongodb_shutdown: - name: Force shutdown with a timeout of 60 seconds mongodb_maintenance: force: true timeout: 60