manala.mongodb

#######################################################################################################

:exclamation: DEPRECATION :exclamation:

This repository and the role associated are deprecated in favor of the Manala Ansible Collection

You will find informations on its usage on the collection repository

#######################################################################################################

Ansible Role: Mongodb Build Status

:exclamation: Report issues and send Pull Requests in the main Ansible Role repository :exclamation:

This role will deal with the setup of Mongodb.

It's part of the Manala Ansible stack but can be used as a stand alone component.

Requirements

This role does NOT handle responsibility to configure mongodb apt repository ! For this purpose, one can make usage of our shiny manala.apt role:

manala_apt_preferences:
  - mongodb@mongodb_4_4

Dependencies

None.

Installation

Ansible 2+

Using ansible galaxy cli:

ansible-galaxy install manala.mongodb

Using ansible galaxy requirements file:

- src: manala.mongodb

Role Handlers

Name Type Description
mongodb restart Service Restart mongodb server

Role Variables

Name Default Type Description
manala_mongodb_install_packages ~ Array Dependency packages to install
manala_mongodb_install_packages_default ['mongodb-org', 'mongodb-org-server', 'mongodb-org-shell', 'mongodb-org-tools'] Array Default dependency packages to install
manala_mongodb_config_file '/etc/mongod.conf' String Configuration file path
manala_mongodb_config_template 'config/_default.j2' String Configuration template path
manala_mongodb_config ~ Array/String Configuration

Configuration example

Use dict parameters:

manala_mongodb_config:
  port: 12345

Use raw content:

manala_mongodb_config: |
  port: 12345

Use template:

manala_mongodb_config_template: my/mongod.conf.j2
manala_mongodb_config:
  foo: bar

Use dict's array parameters (deprecated):

manala_supervisor_config:
  - port: 12345

Users:

manala_mongodb_users:
  - name: foo
    password: foo
    database: admin
    roles: userAdminAnyDatabase
  # Ignore user
  - name: bar
    state: ignore
  # Flatten users
  - "{{ my_custom_users_array }}"

Example playbook

- hosts: servers
  roles:
    - role: manala.mongodb

Licence

MIT

Author information

Manala (http://www.manala.io/)

About

Handle mongodb

Install
ansible-galaxy install manala.mongodb
GitHub repository
License
Unknown
Downloads
5.7k
Owner
Manala is an open source project supported by the french web agency ELAO providing advanced ansible roles for website's infrastructures and far more.