- packages
stat: path=/etc/systemd/system/check_mk.socket
when: "ansible_distribution_major_version >= '8'"
+ check_mode: no
register: check_mk_socket_unit
- name: install systemd socket unit files
mode=644
owner=root
src=check_mk.socket.j2
- when: "check_mk_socket_unit is defined and check_mk_socket_unit.stat.exists == False and ansible_distribution_major_version >= '8'"
+ when: ansible_distribution_major_version >= '8' and check_mk_socket_unit.stat.exists == False
notify:
- reload systemd daemon
mode=644
owner=root
src=check_mk@.service.j2
- when: "check_mk_socket_unit is defined and check_mk_socket_unit.stat.exists == False and ansible_distribution_major_version >= '8'"
+ when: ansible_distribution_major_version >= '8' and check_mk_socket_unit.stat.exists == False
notify:
- reload systemd daemon