David Castellanos 40c3cedc7c Fix (again) Systemd support
Commit #d9393b1 did not completely fixed the systemd-related issues.
The handler "reload systemd" has a "when" clause which fails in
systemd-based systems.

This commit attempts to fix the problem described above. The "when"
clause in the handler "reload systemd" has been fixed. Some facts has
been added in the install playbook, in order to make the code more
simple and easier to maintain.
2016-09-29 09:39:37 +02:00

21 lines
550 B
YAML

---
- name: mongodb reload
service: name={{ mongodb_daemon_name }} state=reloaded
when: mongodb_manage_service
- name: mongodb restart
service: name={{ mongodb_daemon_name }} state=restarted
when: mongodb_manage_service
- name: mongodb-mms-automation-agent restart
service: name=mongodb-mms-automation-agent state=restarted
when: mongodb_manage_service
- name: reload systemd
shell: systemctl daemon-reload
when: mongodb_is_systemd and mongodb_manage_service
- name: restart sysfsutils
service: name=sysfsutils state=restarted