From: Alexander Barton Date: Thu, 17 Dec 2015 16:17:42 +0000 (+0100) Subject: check-mk-agent: Fix detection of non-systemd-enabled hosts X-Git-Url: https://arthur.barton.de/gitweb/?p=AnsibleRoles.git;a=commitdiff_plain;h=e7596338b946f1aad571ed83e7bb2fae0f2f9fed check-mk-agent: Fix detection of non-systemd-enabled hosts --- diff --git a/roles/check-mk-agent/tasks/main.yml b/roles/check-mk-agent/tasks/main.yml index 9e2061a..4b36238 100644 --- a/roles/check-mk-agent/tasks/main.yml +++ b/roles/check-mk-agent/tasks/main.yml @@ -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: