Remove not needed conditions from handlers.
This commit is contained in:
parent
0b50bcc867
commit
56af8c7e9b
|
@ -3,9 +3,6 @@
|
|||
- name: reload systemd
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
when:
|
||||
- ansible_service_mgr == "systemd"
|
||||
- mongodb_manage_service | bool
|
||||
|
||||
- name: run disable-transparent-hugepages
|
||||
systemd:
|
||||
|
@ -13,13 +10,6 @@
|
|||
enabled: true
|
||||
state: started
|
||||
daemon_reload: yes
|
||||
when: ansible_service_mgr == "systemd" and mongodb_disable_transparent_hugepages | bool
|
||||
|
||||
- name: mongodb reload
|
||||
service:
|
||||
name: "{{ mongodb_daemon_name }}"
|
||||
state: reloaded
|
||||
when: mongodb_manage_service | bool
|
||||
|
||||
- name: mongodb restart
|
||||
service:
|
||||
|
@ -38,11 +28,6 @@
|
|||
name: sysfsutils
|
||||
state: restarted
|
||||
|
||||
- name: service started
|
||||
service:
|
||||
name: "{{ mongodb_daemon_name }}"
|
||||
state: started
|
||||
|
||||
- name: wait when mongodb is started
|
||||
wait_for:
|
||||
host: "{{ item }}"
|
||||
|
@ -56,3 +41,4 @@
|
|||
port: "{{ mongodb_net_port }}"
|
||||
delay: 5
|
||||
timeout: 120
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
mode: 0644
|
||||
notify:
|
||||
- mongodb restart
|
||||
- service started
|
||||
- wait when mongodb is started
|
||||
|
||||
- name: Flush all handlers at this point
|
||||
|
|
|
@ -10,4 +10,7 @@
|
|||
- "disable-transparent-hugepages.{{ ansible_distribution | lower }}.service.j2"
|
||||
- "disable-transparent-hugepages.{{ ansible_os_family | lower }}.service.j2"
|
||||
notify: "run disable-transparent-hugepages"
|
||||
when:
|
||||
- ansible_service_mgr == "systemd"
|
||||
- mongodb_disable_transparent_hugepages | bool
|
||||
|
||||
|
|
|
@ -124,6 +124,12 @@
|
|||
no_log: false
|
||||
tags: [mongodb]
|
||||
|
||||
- name: service started
|
||||
service:
|
||||
name: "{{ mongodb_daemon_name }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Include MMS Agent configuration
|
||||
include: mms-agent.yml
|
||||
when: mongodb_mms_api_key | length > 0
|
||||
|
|
|
@ -19,9 +19,14 @@
|
|||
mode: 0755
|
||||
|
||||
- name: Configure the MMS agent pt. 2
|
||||
template: src=monitoring-agent.config.j2 dest=/etc/mongodb-mms/monitoring-agent.config
|
||||
template:
|
||||
src: monitoring-agent.config.j2
|
||||
dest: /etc/mongodb-mms/monitoring-agent.config
|
||||
notify: mongodb-mms-monitoring-agent restart
|
||||
|
||||
- name: Ensure that the MMS agent is started
|
||||
service: name=mongodb-mms-monitoring-agent state=started enabled=yes
|
||||
when: mongodb_manage_service
|
||||
service:
|
||||
name: mongodb-mms-monitoring-agent
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
|
|
Loading…
Reference in New Issue