Git Product home page Git Product logo

ansible-mongod-3.2's Introduction

ansible-mongodb-3.2

Ensures MongoDB 3.2 is installed and configured.

Requirements

This role requires Ansible 2.0

Role Variables

These variables are not defined by default, but can be passed to the role to modify installation behaviour.

- name: mongodb_bind_ip
  desc: IP address MongoDB should to bind to

Defaults

- name: mongodb_version
  value: 3.2.21
  desc: MongoDB version to install

- name: mongodb_port
  value: 27017
  desc: TCP port MongoDB will listen on

- name: mongodb_dbpath
  value: /var/lib/mongodb
  desc: path to db files

- name: mongodb_logpath
  value: /var/log/mongodb/mongod.log
  desc: path to log

- name: mongodb_storage_engine
  value: "wiredTiger"
  desc: the storage engine for mongod database

- name: mongodb_journal_enabled
  value: true
  desc: whether to enable journaling

- name: mongodb_profiling_threshold
  value: 100
  desc: minimum query duration before it is logged by profiler

- name: mongodb_profiling_mode
  value: "off"
  desc: profiling mode (off|slowOp|all)

- name: mongodb_enable_localhost_auth_bypass
  value: true
  desc: whether to enable local authentication bypass

- name: mongodb_is_arbiter
  value: false
  desc: whether this node is an arbiter (if true disables journaling, enables small files)

- name: mongodb_authorization_enabled
  value: true
  desc: whether to enable authorization

Vars

This variables are not meant to be modified, but can be used by other roles.

- name: mongodb_service_name
  desc: Name of the MongoDB service
  value: mongod

- name: mongodb_user
  desc: name of the user MongoDB is running as
  value: mongodb

- name: mongodb_group
  desc: name of the group MongoDB is running as
  value: mongodb

- name: mongodb_packages
  desc: List of MongoDB packages to install
  value:
    - mongodb-org={{ mongodb_version }}
    - mongodb-org-server={{ mongodb_version }}
    - mongodb-org-shell={{ mongodb_version }}
    - mongodb-org-mongos={{ mongodb_version }}
    - mongodb-org-tools={{ mongodb_version }}

Dependencies

None

Example Playbook

Install standalone MongoDB

- hosts: all
  roles:
    - shared/mongodb-3.2

Install standalone MongoDB specifying port, IP and with journal disabled

- hosts: all
  roles:
    - role: shared/mongodb-3.2
      mongodb_port: 38875
      mongodb_bind_ip: 127.0.0.1
      mongodb_journal_enabled: false

Install MongoDB with specific version (3.2.x)

- hosts: all
  roles:
    - role: shared/mongodb-3.2
      mongodb_version: 3.2.21

ansible-mongod-3.2's People

Contributors

bernard-sh avatar crazynuxer avatar

Watchers

James Cloos 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.