Merge branch 'develop'

This commit is contained in:
Kirill Klenov 2015-01-07 14:45:53 +03:00
commit d691dc91d5
8 changed files with 33 additions and 20 deletions

View File

@ -1,6 +1,6 @@
[bumpversion]
commit = True
current_version = 2.1.1
current_version = 2.1.2
tag = True
tag_name = {new_version}

View File

@ -15,12 +15,15 @@ Ansible role which manage [MongoDB](http://www.mongodb.org/)
```yaml
mongodb_enabled: yes
mongodb_packages:
mongodb_package: mongodb-org
mongodb_additional_packages:
- python-selinux
- python-pymongo
- mongodb-org
mongodb_user: mongodb
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' == mongodb_package) 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
@ -31,7 +34,7 @@ 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/mongod.log # Log file to send write to instead of stdout
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

View File

@ -1,12 +1,15 @@
---
mongodb_enabled: yes
mongodb_packages:
mongodb_package: mongodb-org
mongodb_additional_packages:
- python-selinux
- python-pymongo
- mongodb-org
mongodb_user: mongodb
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' == mongodb_package) 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
@ -17,7 +20,7 @@ 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/mongod.log # Log file to send write to instead of stdout
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

View File

@ -1,10 +1,10 @@
---
- name: mongodb reload
service: name=mongod state=reloaded
service: name={{ mongodb_daemon_name }} state=reloaded
- name: mongodb restart
service: name=mongod state=restarted
service: name={{ mongodb_daemon_name }} state=restarted
- name: mongodb-mms-automation-agent restart
service: name=mongodb-mms-automation-agent state=restarted

View File

@ -1,16 +1,17 @@
---
- include_vars: "{{ansible_distribution}}.yml"
- name: Add APT key
apt_key: url=http://docs.mongodb.org/10gen-gpg-key.asc id=7F0CEB10
when: mongodb_package == 'mongodb-org'
- name: Add APT repository (Ubuntu)
apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' update_cache=yes
when: ansible_distribution == 'Ubuntu'
- name: Add APT repository
apt_repository: repo="{{mongodb_repository}}" update_cache=yes
- name: Add APT repository (Debian)
apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' update_cache=yes
when: ansible_distribution == 'Debian'
- name: Install MongoDB package
apt: pkg={{mongodb_package}} state=present
- name: Install mongodb-org
- name: Install additional packages
apt: pkg={{item}}
with_items: mongodb_packages
with_items: mongodb_additional_packages

View File

@ -6,7 +6,7 @@
- include: configure.yml
- name: Ensure mongodb is started
service: name=mongod state=started enabled=yes
service: name={{ mongodb_daemon_name }} state=started enabled=yes
changed_when: False
- include: mms-agent.yml

3
vars/Debian.yml Normal file
View File

@ -0,0 +1,3 @@
---
mongodb_repository: deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

3
vars/Ubuntu.yml Normal file
View File

@ -0,0 +1,3 @@
---
mongodb_repository: deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen