An Ansible role to install MongoDB server.
Ubuntu 18.04+.
parameter | required | default | comments |
---|---|---|---|
mongodb_version |
no | 4.4 |
The major.minor version of MongoDB to install. |
mongodb_data_path |
no | /var/lib/mongodb |
The filesystem path where data files will be persisted. |
mongodb_bind_public |
no | false |
Whether to bind to all network interfaces. This is a security risk. |
mongodb_authorization |
no | false |
Whether to enable access control. Users must be created separately. |
A typical playbook using this role may look like:
- name: Deploy MongoDB
hosts: all
vars:
ansible_python_interpreter: auto
roles:
- role: girder.mongodb
vars:
# Pin version to prevent automatic upgrades
mongodb_version: "4.4"
A typical
Ansible Galaxy requirements.yml
file
should look like:
- src: girder.mongodb
version: master