forked from evolix/ansible-roles
WIP mongodb: compatibility with Debian 10
This commit is contained in:
parent
ee72dd07ff
commit
76864f226e
|
@ -19,7 +19,7 @@ The **patch** part changes incrementally at each release.
|
||||||
* generate-ldif: support MariaDB 10.3
|
* generate-ldif: support MariaDB 10.3
|
||||||
* haproxy: add a variable to keep the existing configuration
|
* haproxy: add a variable to keep the existing configuration
|
||||||
* listupgrade: install old-kernel-autoremoval script
|
* listupgrade: install old-kernel-autoremoval script
|
||||||
* mongodb: still incompatible with Debian 10
|
* mongodb: compatibility with Debian 10
|
||||||
* mysql: activate binary logs by specifying log_bin path
|
* mysql: activate binary logs by specifying log_bin path
|
||||||
* mysql: specify a custom server_id
|
* mysql: specify a custom server_id
|
||||||
* mysql-oracle: backport tasks from mysql role
|
* mysql-oracle: backport tasks from mysql role
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: MongoDB is incompatible with Debian 10
|
|
||||||
fail:
|
|
||||||
msg: MongoDB is incompatible with Debian 10
|
|
||||||
|
|
||||||
- name: MongoDB public GPG Key
|
- name: MongoDB public GPG Key
|
||||||
apt_key:
|
apt_key:
|
||||||
# url: https://www.mongodb.org/static/pgp/server-4.2.asc
|
# url: https://www.mongodb.org/static/pgp/server-4.2.asc
|
||||||
|
@ -27,16 +23,16 @@
|
||||||
name: python-pymongo
|
name: python-pymongo
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
# - name: Custom configuration
|
- name: Custom configuration
|
||||||
# template:
|
template:
|
||||||
# src: mongod_buster.conf.j2
|
src: mongod_buster.conf.j2
|
||||||
# dest: "/etc/mongod.conf"
|
dest: "/etc/mongod.conf"
|
||||||
# force: "{{ mongodb_force_config | bool | ternary('yes', 'no') }}"
|
force: "{{ mongodb_force_config | bool | ternary('yes', 'no') }}"
|
||||||
# notify: restart mongod
|
notify: restart mongod
|
||||||
#
|
|
||||||
# - name: Configure logrotate
|
- name: Configure logrotate
|
||||||
# template:
|
template:
|
||||||
# src: logrotate_buster.j2
|
src: logrotate_buster.j2
|
||||||
# dest: /etc/logrotate.d/mongodb
|
dest: /etc/logrotate.d/mongodb
|
||||||
# force: yes
|
force: yes
|
||||||
# backup: no
|
backup: no
|
||||||
|
|
15
mongodb/templates/logrotate_buster.j2
Normal file
15
mongodb/templates/logrotate_buster.j2
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
/var/log/mongodb/mongodb.log {
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
rotate 365
|
||||||
|
dateext
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
pidof mongod | xargs kill -USR1
|
||||||
|
endscript
|
||||||
|
}
|
39
mongodb/templates/mongodb_buster.conf.j2
Normal file
39
mongodb/templates/mongodb_buster.conf.j2
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# mongodb.conf - {{ ansible_managed }}
|
||||||
|
|
||||||
|
# for documentation of all options, see:
|
||||||
|
# http://docs.mongodb.org/manual/reference/configuration-options/
|
||||||
|
|
||||||
|
# Where and how to store data.
|
||||||
|
storage:
|
||||||
|
dbPath: /var/lib/mongodb
|
||||||
|
journal:
|
||||||
|
enabled: true
|
||||||
|
# engine:
|
||||||
|
# mmapv1:
|
||||||
|
# wiredTiger:
|
||||||
|
|
||||||
|
# where to write logging data.
|
||||||
|
systemLog:
|
||||||
|
destination: file
|
||||||
|
logRotate: reopen
|
||||||
|
logAppend: true
|
||||||
|
path: /var/log/mongodb/mongodb.log
|
||||||
|
|
||||||
|
# network interfaces
|
||||||
|
net:
|
||||||
|
port: {{ mongodb_port }}
|
||||||
|
bindIp: {{ mongodb_bind }}
|
||||||
|
|
||||||
|
#security:
|
||||||
|
|
||||||
|
#operationProfiling:
|
||||||
|
|
||||||
|
#replication:
|
||||||
|
|
||||||
|
#sharding:
|
||||||
|
|
||||||
|
## Enterprise-Only Options:
|
||||||
|
|
||||||
|
#auditLog:
|
||||||
|
|
||||||
|
#snmp:
|
Loading…
Reference in a new issue