This is required for the Ansible configuration to become compatible
with Python 3.
apt: >
state=present
name=check-mk-agent-logwatch
apt: >
state=present
name=check-mk-agent-logwatch
- when: "ansible_distribution_major_version >= '7' and ansible_distribution_major_version < '9'"
+ when: "ansible_distribution_major_version|int >= 7 and ansible_distribution_major_version < '9'"
- name: test for systemd unit files
tags:
- name: test for systemd unit files
tags:
- monitoring
- packages
stat: path=/etc/systemd/system/check_mk.socket
- monitoring
- packages
stat: path=/etc/systemd/system/check_mk.socket
- when: "ansible_distribution_major_version >= '8'"
+ when: "ansible_distribution_major_version|int >= 8"
check_mode: no
register: check_mk_socket_unit
check_mode: no
register: check_mk_socket_unit
mode=0644
owner=root
src=check_mk.socket.j2
mode=0644
owner=root
src=check_mk.socket.j2
- when: ansible_distribution_major_version >= '8' and check_mk_socket_unit.stat.exists == False
+ when: ansible_distribution_major_version|int >= 8 and check_mk_socket_unit.stat.exists == False
notify:
- reload systemd daemon
notify:
- reload systemd daemon
mode=0644
owner=root
src=check_mk@.service.j2
mode=0644
owner=root
src=check_mk@.service.j2
- when: ansible_distribution_major_version >= '8' and check_mk_socket_unit.stat.exists == False
+ when: ansible_distribution_major_version|int >= 8 and check_mk_socket_unit.stat.exists == False
notify:
- reload systemd daemon
notify:
- reload systemd daemon
owner=root
regexp="^[\s]*disable[\s]*="
state=absent
owner=root
regexp="^[\s]*disable[\s]*="
state=absent
- when: "ansible_distribution_major_version < '8'"
+ when: "ansible_distribution_major_version|int < 8"
notify:
- restart "xinetd"
notify:
- restart "xinetd"
enabled=yes
name=check_mk.socket
state=started
enabled=yes
name=check_mk.socket
state=started
- when: "ansible_distribution_major_version >= '8'"
+ when: "ansible_distribution_major_version|int >= 8"
- systemd
systemd: >
daemon_reload=yes
- systemd
systemd: >
daemon_reload=yes
- when: "ansible_distribution == 'Debian' and ansible_distribution_major_version >= '8'"
+ when: "ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= '8'"