]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/check-mk-agent/tasks/main.yml
check-mk-agent: Fix detection of non-systemd-enabled hosts
[AnsibleRoles.git] / roles / check-mk-agent / tasks / main.yml
index 9e2061a08bfa7d4e5ae4f36b0aa03b81d24956e7..4b36238be21c73695b212c94effc2d747c7933ea 100644 (file)
@@ -34,7 +34,7 @@
     mode=644
     owner=root
     src=check_mk.socket.j2
-  when: "check_mk_socket_unit.stat.exists == False and ansible_distribution_major_version >= '8'"
+  when: "check_mk_socket_unit is defined and check_mk_socket_unit.stat.exists == False and ansible_distribution_major_version >= '8'"
   notify:
     - reload systemd daemon
 
@@ -49,9 +49,9 @@
     mode=644
     owner=root
     src=check_mk@.service.j2
-  when: "check_mk_socket_unit.stat.exists == False and ansible_distribution_major_version >= '8'"
+  when: "check_mk_socket_unit is defined and check_mk_socket_unit.stat.exists == False and ansible_distribution_major_version >= '8'"
   notify:
-    - "reload systemd daemon"
+    - reload systemd daemon
 
 - meta: flush_handlers
   tags: