]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/check-mk-agent/tasks/main.yml
check-mk-agent: Add "systemd" tag to task checking for service file
[AnsibleRoles.git] / roles / check-mk-agent / tasks / main.yml
index 3bfc39d66ce4e32a73e89bde19150c8cd20deba3..0e59f1872966e856cd080eae8c561d8bd08d2dac 100644 (file)
@@ -6,12 +6,12 @@
     - check_mk
     - monitoring
     - packages
-  apt: >
-    state=present
-    name={{ item }}
-  with_items:
-    - check-mk-agent
-    - nagios-plugins-basic
+  apt:
+    statepresent
+    name: [
+      'check-mk-agent',
+      'nagios-plugins-basic',
+    ]
 
 - name: install Debian packages for Check_MK agent (2/2)
   tags:
   apt: >
     state=present
     name=check-mk-agent-logwatch
-  when: "ansible_distribution_major_version|int >= 7 and ansible_distribution_major_version < '9'"
+  when: "ansible_distribution_major_version|int >= 7 and ansible_distribution_major_version|int < 9"
 
 - name: test for systemd unit files
   tags:
     - check_mk
     - monitoring
     - packages
+    - systemd
   stat: path=/etc/systemd/system/check_mk.socket
   when: "ansible_distribution_major_version|int >= 8"
   check_mode: no
@@ -80,9 +81,6 @@
 - meta: flush_handlers
   tags:
     - check_mk
-    - monitoring
-    - packages
-    - systemd
 
 - name: ensure "check_mk.socket" is enabled and started
   tags: