2014-06-04 19:09:28 +04:00
|
|
|
---
|
|
|
|
|
2019-05-21 15:42:02 -04:00
|
|
|
- name: reload systemd
|
|
|
|
systemd:
|
|
|
|
daemon_reload: yes
|
|
|
|
when: ansible_service_mgr == "systemd" and mongodb_manage_service
|
|
|
|
|
2014-06-04 19:09:28 +04:00
|
|
|
- name: mongodb reload
|
2015-01-05 14:37:28 +01:00
|
|
|
service: name={{ mongodb_daemon_name }} state=reloaded
|
2019-05-25 22:52:10 -04:00
|
|
|
when: mongodb_manage_service|bool
|
2014-06-04 19:09:28 +04:00
|
|
|
|
|
|
|
- name: mongodb restart
|
2015-01-05 14:37:28 +01:00
|
|
|
service: name={{ mongodb_daemon_name }} state=restarted
|
2019-05-25 22:52:10 -04:00
|
|
|
when: mongodb_manage_service|bool
|
2014-12-19 17:39:09 +03:00
|
|
|
|
2019-04-25 10:33:47 -03:00
|
|
|
- name: mongodb-mms-monitoring-agent restart
|
|
|
|
service: name=mongodb-mms-monitoring-agent state=restarted
|
2019-05-25 22:52:10 -04:00
|
|
|
when: mongodb_manage_service|bool
|
2015-02-25 08:57:36 +01:00
|
|
|
|
2015-06-16 17:33:22 +06:00
|
|
|
- name: restart sysfsutils
|
|
|
|
service: name=sysfsutils state=restarted
|
2019-05-23 00:37:39 -04:00
|
|
|
|
|
|
|
- name: service started
|
|
|
|
service:
|
|
|
|
name: "{{ mongodb_daemon_name }}"
|
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: wait when mongodb is started
|
|
|
|
wait_for:
|
|
|
|
host: "{{ item }}"
|
|
|
|
port: "{{ mongodb_net_port }}"
|
|
|
|
timeout: 120
|
|
|
|
with_items: "{{ mongodb_net_bindip.split(',') | map('replace', '0.0.0.0', '127.0.0.1') | list }}"
|
|
|
|
|
|
|
|
- name: wait when mongodb is started on localhost
|
|
|
|
wait_for:
|
|
|
|
host: "127.0.0.1"
|
|
|
|
port: "{{ mongodb_net_port }}"
|
|
|
|
delay: 5
|
|
|
|
timeout: 120
|