mongodb: fix systemd service
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jérémy Lecour 2019-10-24 16:43:24 +02:00 committed by Jérémy Lecour
parent 76864f226e
commit 5eff84bc07

View file

@ -7,7 +7,7 @@
- name: enable APT sources list
apt_repository:
repo: deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.2 main
repo: deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main
state: present
filename: mongodb-org-4.2
update_cache: yes
@ -17,6 +17,14 @@
name: mongodb-org
update_cache: yes
state: present
register: _mongodb_install_package
- name: MongoDB service in enabled and started
systemd:
name: mongod
enabled: yes
state: started
when: _mongodb_install_package.changed
- name: install dependency for monitoring
apt:
@ -25,7 +33,7 @@
- name: Custom configuration
template:
src: mongod_buster.conf.j2
src: mongodb_buster.conf.j2
dest: "/etc/mongod.conf"
force: "{{ mongodb_force_config | bool | ternary('yes', 'no') }}"
notify: restart mongod