ansible-role-mongodb/README.md

80 lines
1.5 KiB
Markdown
Raw Normal View History

2014-06-04 14:15:52 +00:00
Stouts.mongo
============
2014-10-22 20:59:11 +00: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 15:41:12 +00: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 15:09:28 +00:00
Ansible role which manage [MongoDB](http://www.mongodb.org/)
* Install and configure;
* Provide hanlers for restart and reload;
#### Variables
```yaml
2014-09-02 22:14:06 +00:00
2014-07-10 16:07:35 +00:00
mongodb_enabled: yes
2014-06-04 15:09:28 +00:00
mongodb_packages:
- python-selinux
- python-pymongo
2014-09-02 22:14:06 +00:00
- mongodb-org
2014-06-04 15:09:28 +00:00
mongodb_conf:
2014-09-02 22:14:06 +00:00
auth: "false"
bind_ip: 127.0.0.1
cpu: "true"
2014-09-02 22:14:06 +00:00
dbpath: /var/lib/mongodb/
# diaglog: 0 # deprecated
2014-09-02 22:14:06 +00:00
logappend: "true"
logpath: /var/log/mongodb/mongod.log
noauth: "true"
nohints: "false"
nohttpinterface: "false"
2014-09-02 22:14:06 +00:00
nojournal: "true"
noprealloc: "false"
noscripting: "false"
notablescan: "false"
2014-09-02 22:14:06 +00:00
objcheck: "false"
port: 27017
quota: "false"
# replSet: "" # Set for enable replication
2014-09-02 22:14:06 +00:00
verbose: "true"
vvvv: "true"
2014-07-10 16:07:35 +00:00
# Log rotation
mongodb_logrotate: yes # Rotate mongodb logs.
mongodb_logrotate_options:
- compress
- copytruncate
- daily
- dateext
- rotate 7
- size 10M
2014-06-04 15:09:28 +00:00
```
#### Usage
Add `Stouts.mongodb` to your roles and set vars in your playbook file.
Example:
```yaml
- hosts: all
roles:
2014-12-11 19:09:31 +00:00
- Stouts.mongodb
2014-06-04 15:09:28 +00:00
vars:
2014-12-11 19:09:31 +00:00
mongodb_conf_port: 27400
2014-06-04 15:09:28 +00:00
```
#### 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)!