2014-06-04 18:15:52 +04:00
|
|
|
Stouts.mongo
|
|
|
|
============
|
|
|
|
|
2014-10-23 00:59:11 +04:00
|
|
|
[![Build Status](http://img.shields.io/travis/Stouts/Stouts.mongodb.svg?style=flat-square)](https://travis-ci.org/Stouts/Stouts.mongodb)
|
2014-10-31 18:41:12 +03:00
|
|
|
[![Galaxy](http://img.shields.io/badge/galaxy-Stouts.mongodb-blue.svg?style=flat-square)](https://galaxy.ansible.com/list#/roles/982)
|
2014-06-04 19:09:28 +04:00
|
|
|
|
|
|
|
Ansible role which manage [MongoDB](http://www.mongodb.org/)
|
|
|
|
|
|
|
|
* Install and configure;
|
|
|
|
* Provide hanlers for restart and reload;
|
|
|
|
|
|
|
|
#### Variables
|
|
|
|
|
|
|
|
```yaml
|
2014-09-02 23:14:06 +01:00
|
|
|
|
2014-07-10 20:07:35 +04:00
|
|
|
mongodb_enabled: yes
|
2014-06-04 19:09:28 +04:00
|
|
|
mongodb_packages:
|
|
|
|
- python-selinux
|
|
|
|
- python-pymongo
|
2014-09-02 23:14:06 +01:00
|
|
|
- mongodb-org
|
2014-06-04 19:09:28 +04:00
|
|
|
|
2014-08-25 16:10:18 +02:00
|
|
|
mongodb_conf:
|
2014-09-02 23:14:06 +01:00
|
|
|
auth: "false"
|
2014-08-25 16:10:18 +02:00
|
|
|
bind_ip: 127.0.0.1
|
|
|
|
cpu: "true"
|
2014-09-02 23:14:06 +01:00
|
|
|
dbpath: /var/lib/mongodb/
|
2014-08-25 16:10:18 +02:00
|
|
|
# diaglog: 0 # deprecated
|
2014-09-02 23:14:06 +01:00
|
|
|
logappend: "true"
|
|
|
|
logpath: /var/log/mongodb/mongod.log
|
|
|
|
noauth: "true"
|
2014-08-25 16:10:18 +02:00
|
|
|
nohints: "false"
|
|
|
|
nohttpinterface: "false"
|
2014-09-02 23:14:06 +01:00
|
|
|
nojournal: "true"
|
|
|
|
noprealloc: "false"
|
2014-08-25 16:10:18 +02:00
|
|
|
noscripting: "false"
|
|
|
|
notablescan: "false"
|
2014-09-02 23:14:06 +01:00
|
|
|
objcheck: "false"
|
|
|
|
port: 27017
|
|
|
|
quota: "false"
|
2014-08-25 16:10:18 +02:00
|
|
|
# replSet: "" # Set for enable replication
|
2014-09-02 23:14:06 +01:00
|
|
|
verbose: "true"
|
|
|
|
vvvv: "true"
|
|
|
|
|
2014-07-10 20:07:35 +04:00
|
|
|
|
|
|
|
# Log rotation
|
|
|
|
mongodb_logrotate: yes # Rotate mongodb logs.
|
|
|
|
mongodb_logrotate_options:
|
|
|
|
- compress
|
|
|
|
- copytruncate
|
|
|
|
- daily
|
|
|
|
- dateext
|
|
|
|
- rotate 7
|
|
|
|
- size 10M
|
2014-06-04 19:09:28 +04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
Add `Stouts.mongodb` to your roles and set vars in your playbook file.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
|
|
|
- hosts: all
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- Stouts.mongodb
|
|
|
|
|
|
|
|
vars:
|
|
|
|
port: 27400
|
|
|
|
```
|
|
|
|
|
|
|
|
#### License
|
|
|
|
|
|
|
|
Licensed under the MIT License. See the LICENSE file for details.
|
|
|
|
|
|
|
|
#### Feedback, bug-reports, requests, ...
|
|
|
|
|
|
|
|
Are [welcome](https://github.com/Stouts/Stouts.mongodb/issues)!
|