I have created the following ping check with ansible. (Works but is not idempotent).
Now what is surprising is that a similar http check is idempotent as it should be. Whereas the icmp check is not idempotent. Therefore I get after every run an additional rule.
Any ideas?
Thank you
BAD:
- name: "PING QUAD9"
tribe29.checkmk.rule:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
ruleset: "active_checks:icmp"
rule:
folder: "/quad"
properties:
"description": "QUAD9"
value_raw: "{'description': 'PING QUAD9', 'address': ('explicit', '9.9.9.9'), 'rta': (200.0, 500.0), 'loss': (80.0, 100.0), 'packets': 5, 'timeout': 1}"
state: "present"
GOOD
- name: "Create rule google"
tribe29.checkmk.rule:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
ruleset: "active_checks:http"
rule:
folder: "/quad"
properties:
"description": "google"
"disabled": False
value_raw: "{'name': 'google', 'host': {'address': 'www.google.ch'}, 'mode': ('url', {'uri': '/maps'}), 'disable_sni': True}"
state: "present"