mongodb: configuration is forced by default but it's configurable

This commit is contained in:
Jérémy Lecour 2018-02-23 18:41:07 +01:00 committed by Jérémy Lecour
parent 1ac3300ade
commit 54159f8e87
5 changed files with 6 additions and 4 deletions

View file

@ -19,6 +19,7 @@ The **patch** part changes incrmentally at each release.
* elasticsearch: use ES_TMPDIR variable for custom tmpdir, (from `/etc/default/elasticsearch` instead of changing `/etc/elesticsearch/jvm.options`).
* elasticsearch: RESTART_ON_UPGRADE is configurable (default: `true`)
* nagios-nrpe: mark plugins as executable
* mongodb: configuration is forced by default but it's configurable (default: `true`)
* nginx: package name can be specified (default: `nginx-full`)
### Fixed

View file

@ -12,5 +12,6 @@ Everything is in the `tasks/main.yml` file.
* `mongodb_port`: port to listen to (default: `27017`)
* `mongodb_bind`: IP to bind to (default: `127.0.0.1`)
* `mongodb_force_config`: force copy the configuration (default: `true`)
The full list of variables (with default values) can be found in `defaults/main.yml`.

View file

@ -2,3 +2,5 @@
mongodb_port: 27017
mongodb_bind: 127.0.0.1
mongodb_force_config: True

View file

@ -26,8 +26,7 @@
template:
src: mongod_jessie.conf.j2
dest: "/etc/mongod.conf"
force: yes
backup: no
force: "{{ mongodb_force_config | bool | ternary('yes', 'no') }}"
notify: restart mongod
- name: Configure logrotate

View file

@ -17,8 +17,7 @@
template:
src: mongodb_stretch.conf.j2
dest: "/etc/mongodb.conf"
force: yes
backup: no
force: "{{ mongodb_force_config | bool | ternary('yes', 'no') }}"
notify: restart mongodb
- name: enable service