Merge branch 'develop'
This commit is contained in:
commit
937dcc6bee
|
@ -1,6 +1,6 @@
|
||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
current_version = 1.3.3
|
current_version = 1.3.4
|
||||||
tag = True
|
tag = True
|
||||||
tag_name = {new_version}
|
tag_name = {new_version}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ Example:
|
||||||
- Stouts.mongodb
|
- Stouts.mongodb
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
port: 27400
|
mongodb_conf_port: 27400
|
||||||
```
|
```
|
||||||
|
|
||||||
#### License
|
#### License
|
||||||
|
|
|
@ -6,27 +6,24 @@ mongodb_packages:
|
||||||
- python-pymongo
|
- python-pymongo
|
||||||
- mongodb-org
|
- mongodb-org
|
||||||
|
|
||||||
mongodb_conf:
|
mongodb_conf_auth: "false"
|
||||||
auth: "false"
|
mongodb_conf_bind_ip: 127.0.0.1
|
||||||
bind_ip: 127.0.0.1
|
mongodb_conf_cpu: "true"
|
||||||
cpu: "true"
|
mongodb_conf_dbpath: /var/lib/mongodb/
|
||||||
dbpath: /var/lib/mongodb/
|
mongodb_conf_logappend: "true"
|
||||||
# diaglog: 0 # deprecated
|
mongodb_conf_logpath: /var/log/mongodb/mongod.log
|
||||||
logappend: "true"
|
mongodb_conf_noauth: "true"
|
||||||
logpath: /var/log/mongodb/mongod.log
|
mongodb_conf_nohints: "false"
|
||||||
noauth: "true"
|
mongodb_conf_nohttpinterface: "false"
|
||||||
nohints: "false"
|
mongodb_conf_nojournal: "true"
|
||||||
nohttpinterface: "false"
|
mongodb_conf_noprealloc: "false"
|
||||||
nojournal: "true"
|
mongodb_conf_noscripting: "false"
|
||||||
noprealloc: "false"
|
mongodb_conf_notablescan: "false"
|
||||||
noscripting: "false"
|
mongodb_conf_objcheck: "false"
|
||||||
notablescan: "false"
|
mongodb_conf_port: 27017
|
||||||
objcheck: "false"
|
mongodb_conf_quota: "false"
|
||||||
port: 27017
|
mongodb_conf_verbose: "true"
|
||||||
quota: "false"
|
mongodb_conf_vvvv: "true"
|
||||||
# replSet: "" # Set for enable replication
|
|
||||||
verbose: "true"
|
|
||||||
vvvv: "true"
|
|
||||||
|
|
||||||
|
|
||||||
# Log rotation
|
# Log rotation
|
||||||
|
|
|
@ -2,8 +2,17 @@
|
||||||
|
|
||||||
- name: Configure mongodb
|
- name: Configure mongodb
|
||||||
template: src=mongod.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0644
|
template: src=mongod.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0644
|
||||||
notify: mongodb reload
|
notify: mongodb restart
|
||||||
|
|
||||||
- name: Configure log rotation
|
- name: Configure log rotation
|
||||||
template: src=logrotate.conf.j2 dest=/etc/logrotate.d/mongodb.conf
|
template: src=logrotate.conf.j2 dest=/etc/logrotate.d/mongodb.conf
|
||||||
when: mongodb_logrotate
|
when: mongodb_logrotate
|
||||||
|
|
||||||
|
- name: Create mongodb user
|
||||||
|
user: name=mongodb group=mongodb
|
||||||
|
|
||||||
|
- name: Configure database directory
|
||||||
|
file: state=directory path={{ mongodb_conf_dbpath }} owner=mongodb group=mongodb mode=0755
|
||||||
|
|
||||||
|
- name: Configure logs
|
||||||
|
file: state=file path={{ mongodb_conf_logpath }} owner=mongodb group=mongodb mode=0644
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# This file was generated by Ansible for {{ ansible_fqdn }}
|
# This file was generated by Ansible for {{ ansible_fqdn }}
|
||||||
# Do NOT modify this file by hand!
|
# Do NOT modify this file by hand!
|
||||||
|
|
||||||
{{ mongodb_conf.logpath }} {
|
{{ mongodb_conf_logpath }} {
|
||||||
{% for option in mongodb_logrotate_options %}
|
{% for option in mongodb_logrotate_options %}
|
||||||
{{ option }}
|
{{ option }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,5 +1,20 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% for k, v in mongodb_conf.iteritems()|sort %}
|
auth = {{ mongodb_conf_auth }}
|
||||||
{{ k }} = {{ v }}
|
bind_ip = {{ mongodb_conf_bind_ip }}
|
||||||
{% endfor %}
|
cpu = {{ mongodb_conf_cpu }}
|
||||||
|
dbpath = {{ mongodb_conf_dbpath }}
|
||||||
|
logappend = {{ mongodb_conf_logappend }}
|
||||||
|
logpath = {{ mongodb_conf_logpath }}
|
||||||
|
noauth = {{ mongodb_conf_noauth }}
|
||||||
|
nohints = {{ mongodb_conf_nohints }}
|
||||||
|
nohttpinterface = {{ mongodb_conf_nohttpinterface }}
|
||||||
|
nojournal = {{ mongodb_conf_nojournal }}
|
||||||
|
noprealloc = {{ mongodb_conf_noprealloc }}
|
||||||
|
noscripting = {{ mongodb_conf_noscripting }}
|
||||||
|
notablescan = {{ mongodb_conf_notablescan }}
|
||||||
|
objcheck = {{ mongodb_conf_objcheck }}
|
||||||
|
port = {{ mongodb_conf_port }}
|
||||||
|
quota = {{ mongodb_conf_quota }}
|
||||||
|
verbose = {{ mongodb_conf_verbose }}
|
||||||
|
vvvv = {{ mongodb_conf_vvvv }}
|
||||||
|
|
Loading…
Reference in New Issue