---
# tasks file for check-mk-agent
-- name: install Debian packages for Check_MK agent
+- name: install Debian packages for Check_MK agent (1/2)
tags:
- check_mk
- monitoring
- packages
apt: >
- state=installed
+ state=present
name={{ item }}
with_items:
- check-mk-agent
- - check-mk-agent-logwatch
- nagios-plugins-basic
+- name: install Debian packages for Check_MK agent (2/2)
+ tags:
+ - check_mk
+ - monitoring
+ - packages
+ apt: >
+ state=present
+ name=check-mk-agent-logwatch
+ when: "ansible_distribution_major_version >= '7' and ansible_distribution_major_version < '9'"
+
- name: test for systemd unit files
tags:
- check_mk