]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/check-mk-agent/tasks/main.yml
Apt module: Update "state=installed" to "state=present"
[AnsibleRoles.git] / roles / check-mk-agent / tasks / main.yml
index e6f358501e6807e929e6fc6ff31a83538c339b49..3e5ffc0b53195bca472e83aa14591e266d0fa464 100644 (file)
@@ -1,19 +1,28 @@
 ---
 # 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