Repository URL to install this package:
Version:
6.0.0 ▾
|
.. |
changelogs |
meta |
plugins |
roles |
CHANGELOG.rst |
COPYING |
FILES.json |
MANIFEST.json |
README.md |
requirements-2.7.txt |
requirements-3.5.txt |
requirements-3.6.txt |
requirements-3.8.txt |
Category | Status |
---|---|
Github CI | |
Github Docs | |
Codecov | |
CI Roles | |
AutomatingMongoDBWithAnsible | |
AutomatingMongoDBWithAnsible | |
AutomatingMongoDBWithAnsible | |
AutomatingMongoDBWithAnsible | |
Latest Build |
This collection called mongodb
aims at providing all Ansible modules allowing to interact with MongoDB.
The modules present in Ansible 2.9 are included in this collection and will benefit from the evolutions and quality requirements from this collection.
As this is an independent collection, it can be released on its own release cadence.
If you like this collection please give us a rating on Ansible Galaxy.
These roles prepare servers with Debian-based and RHEL-based distributions to run MongoDB:
community.mongodb.mongodb_linux
: A simple role to configure Linux Operating System settings, as advised in the MongoDB Production Notes.
community.mongodb.mongodb_selinux
: Configure SELinux for MongoDB.
community.mongodb.mongodb_repository
: Configures a package repository for MongoDB on Debian and RedHat based platforms.
community.mongodb.mongodb_install
: Install MongoDB packages on Debian and RedHat based platforms. This role, unlike all other roles, provides for installing specific versions of mongodb-org packages. Other roles merely validate that mongodb-org is installed/present; they do not install particular versions.
These roles manage configuring and starting various MongoDB services.
community.mongodb.mongodb_mongod
: Configure the mongod
service (includes populating mongod.conf
) which is a MongoDB replicaset or standalone server.community.mongodb.mongodb_mongos
: Configure the mongos
service (includes populating mongos.conf
) which only runs in a sharded MongoDB cluster.community.mongodb.mongodb_config
: Configure the CSRS Config Server Replicaset for a MongoDB sharded cluster. The CSRS is a special-purpose instance of mongod
that hosts the config
database for the sharded cluster. For standalone installations, please use the mongodb_mongod
role instead.community.mongodb.mongodb_auth
: Configure auth on MongoDB servers. NB: The other MongoDB server config roles (mongodb_mongod
, mongodb_mongos
, mongodb_config
) do not configure auth. Use this role in conjunction with the other roles.community.mongodb.mongodb
: A lookup plugin that gets info from a collection using the MongoDB find()
function.community.mongodb.mongodb
: A cache plugin that stores the host fact cache records in MongoDB.These modules are for any MongoDB cluster (standalone, replicaset, or sharded):
community.mongodb.mongodb_index
: Creates or drops indexes on MongoDB collections.community.mongodb.mongodb_info
: Gather information about MongoDB instance.community.mongodb.mongodb_monitoring
: Manages the free monitoring feature.community.mongodb.mongodb_oplog
: Resizes the MongoDB oplog (MongoDB 3.6+ only).community.mongodb.mongodb_parameter
: Change an administrative parameter on a MongoDB server.community.mongodb.mongodb_schema
: Manages MongoDB Document Schema Validators.community.mongodb.mongodb_shell
: Run commands via the MongoDB shell.community.mongodb.mongodb_shutdown
: Cleans up all database resources and then terminates the mongod/mongos process.community.mongodb.mongodb_user
: Adds or removes a user from a MongoDB database.These modules are only useful for replicaset (or sharded) MongoDB clusters:
community.mongodb.mongodb_maintenance
: Enables or disables maintenance mode for a secondary member.community.mongodb.mongodb_replicaset
: Initialises a MongoDB replicaset.community.mongodb.mongodb_status
: Validates the status of the replicaset.community.mongodb.mongodb_stepdown
: Step down the MongoDB node from a PRIMARY state.These modules are only useful for sharded MongoDB clusters:
community.mongodb.mongodb_balancer
: Manages the MongoDB Sharded Cluster Balancer.community.mongodb.mongodb_shard
: Add or remove shards from a MongoDB Cluster.community.mongodb.mongodb_shard_tag
: Manage Shard Tags.community.mongodb.mongodb_shard_zone
: Manage Shard Zones.These tags are applicable across all roles.
tags | comment |
---|---|
mongodb | Tasks specific to MongoDB. |
debian | Tasks specific to Debian Family Operating Systems. |
redhat | Tasks specific to RedHat Family Operating Systems. |
pip | Tasks working with pip. |
vars | Tasks that load variables. |
pkg | Tasks that install packages. |
debug | Tasks that output debugging info. |
service | Tasks dealing with system services. |
setup | Tasks that are mainly executed during initial deployment. |
ci | Tasks that are specific to the community.mongodb CI code. |
linux | Tasks affecting Linux OS settings. |
These tags apply to the specific roles as indicated.
role | tag | comment |
---|---|---|
mongodb_auth | admin_user | Tasks that work with the MongoDB Administrator user. |
mongodb_auth | app_user | Tasks that work with MongoDB app users. |
Requirements
Useful Links
The ansible-test tool requires a specific directory hierarchy to function correctly so please follow carefully.
mkdir -p git/ansible_collections/community cd git/ansible_collections/community
git clone https://github.com/ansible-collections/community.mongodb.git ./mongodb git clone https://github.com/ansible-collections/community.general.git ./general
virtualenv venv source venv/bin/activate
cd mongodb
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
ansible-test integration --docker default -v --color --python 3.6 mongodb_shard
ansible-test integration --docker default -v --color --python 3.6 mongodb_status
ansible-test integration --docker ubuntu1804 -v --color --python 3.6 mongodb_oplog
ansible-test integration --docker default -v --color --python 3.6
ansible-test units --docker default -v --color --python 3.6
Needs improvement but the general process for issuing a new release to Ansible Galaxy is as follows...
git log 1.3.0..HEAD git log 1.3.0..HEAD --oneline
git tag <release> git push --tags
Automation will bundle the release and push to Galaxy. Should take around 10-15 minutes.
Any contribution is welcome and we only ask contributors to:
GNU General Public License v3.0 or later
See LICENCING to see the full text.