1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/mongodb/tasks/enable-or-disable.yml

15 lines
335 B
YAML
Raw Normal View History

- name: Enable & (Re)Start 'mongodb.service' if mongodb_enabled
systemd:
name: mongodb
daemon_reload: yes
enabled: yes
state: restarted
when: mongodb_enabled
- name: Disable & Stop 'mongodb.service' if not mongodb_enabled
systemd:
name: mongodb
enabled: no
state: stopped
when: not mongodb_enabled