ansible-role-mongodb/handlers/main.yml

18 lines
403 B
YAML

---
- name: Restart mongod
service: name=mongod state=restarted
when: "'{{ mongodb_start_server }}' == 'yes'"
- name: Restart mongodb
service: name=mongodb state=restarted
when: "'{{ mongodb_start_server }}' == 'yes'"
- name: Restart mongodb exporter
ansible.builtin.service:
name: mongodb_exporter
state: restarted
- name: Reload the systemd data
systemd:
daemon_reload: yes