checkmk-plugins/ansible-check_mk/roles/webservers/handlers/main.yml

21 lines
706 B
YAML

---
- name: restart httpd
service: name=httpd state=restarted
tags:
- httpd
notify:
- cmk_discovery
- cmk_apply
- name: cmk_discovery
command: curl 'http://{{ omdhost }}/{{ omdsite }}/check_mk/webapi.py?action=discover_services&_username={{ automationuser }}&_secret={{ autosecret }}&mode=refresh' -d 'request={"hostname":"{{ inventory_hostname }}"}'
tags:
- check_mk_agent
- check_mk_discovery
- name: cmk_apply
command: curl 'http://{{ omdhost }}/{{ omdsite }}/check_mk/webapi.py?action=activate_changes&_username={{ automationuser }}&_secret={{ autosecret }}&mode=specific' -d 'request={"sites":["{{ omdsite }}"]}'
tags:
- check_mk_agent
- check_mk_discovery