Code Monkey home page Code Monkey logo

stouts.mongodb's Introduction

Stouts.mongo

Build Status Galaxy

Ansible role which manage MongoDB

  • Install and configure the MongoDB;
  • Provide hanlers for restart and reload;
  • Setup MMS authomation agent;

Variables

mongodb_enabled: yes
mongodb_from_mongodb_repo: yes # If yes, install using MongoDB repo, else use system default repo

mongodb_additional_packages:
  - python-selinux
  - python-pymongo

mongodb_user: mongodb
mongodb_daemon_name: "{{ 'mongod' if (mongodb_from_mongodb_repo | bool) else 'mongodb' }}"

mongodb_conf_auth: no                             # Run with security
mongodb_conf_bind_ip: 127.0.0.1                   # Comma separated list of ip addresses to listen on
mongodb_conf_cpu: yes                             # Periodically show cpu and iowait utilization
mongodb_conf_dbpath: /data/db                     # Directory for datafiles
mongodb_conf_fork: no                             # Fork server process
mongodb_conf_httpinterface: no                    # Enable http interface
mongodb_conf_ipv6: no                             # Enable IPv6 support (disabled by default)
mongodb_conf_journal: no                          # Enable journaling
mongodb_conf_logappend: yes                       # Append to logpath instead of over-writing
mongodb_conf_logpath: /var/log/mongodb/{{ mongodb_daemon_name }}.log # Log file to send write to instead of stdout
mongodb_conf_maxConns: 1000000                    # Max number of simultaneous connections
mongodb_conf_noprealloc: no                       # Disable data file preallocation
mongodb_conf_noscripting: no                      # Disable scripting engine
mongodb_conf_notablescan: no                      # Do not allow table scans
mongodb_conf_port: 27017                          # Specify port number
mongodb_conf_quota: no                            # Limits each database to a certain number of files
mongodb_conf_quotaFiles: 8                        # Number of quota files
mongodb_conf_syslog: no                           # Log to system's syslog facility instead of file

# Replica set options:
mongodb_conf_replSet:                             # Enable replication <setname>[/<optionalseedhostlist>]
mongodb_conf_replIndexPrefetch: all               # specify index prefetching behavior (if secondary) [none|_id_only|all]

mongodb_shell: {}                                 # Define mongo shell commands to run
                                                  # Syntax: mongodb_shell:
                                                  #          dbname:
                                                  #           - db.setProfilingLevel(1, 50)


# MMS Agent
mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb
mongodb_mms_group_id: ""
mongodb_mms_api_key: ""
mongodb_mms_base_url: https://mms.mongodb.com

# Log rotation
mongodb_logrotate: yes                             # Rotate mongodb logs.
mongodb_logrotate_options:
  - compress
  - copytruncate
  - daily
  - dateext
  - rotate 7
  - size 10M

Usage

Add Stouts.mongodb to your roles and set vars in your playbook file.

Example:

- hosts: all

  roles:
  - Stouts.mongodb

  vars:
    mongodb_conf_port: 27400

License

Licensed under the MIT License. See the LICENSE file for details.

Feedback, bug-reports, requests, ...

Are welcome!

stouts.mongodb's People

Contributors

klen avatar kxepal avatar guillaumededrie avatar

Watchers

 avatar James Cloos avatar Guy Foetz avatar Adrien Guinet avatar David Carle avatar  avatar Pierre avatar  avatar  avatar  avatar  avatar  avatar buildbot irma avatar kalu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.