ansible-check_mk/roles/webservers/handlers/main.yml
Marius Pana 0a123abbcb initial commit
playbooks, scripts, etc. from the 2nd check_mk conference in munich,
germany.
2015-10-28 16:37:02 +02:00

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