From c88675854a31a404dc639a71346385b6bf045553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Thu, 5 Oct 2023 15:32:42 +0200 Subject: [PATCH] style: satisfy linter --- .ansible-lint | 1 + tasks/install_subapp.yml | 4 +++- tasks/remove_packages.yml | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 071c3f4..98d64bd 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -38,6 +38,7 @@ skip_list: - skip_this_tag - git-latest - name[casing] + - package-latest # Any rule that has the 'opt-in' tag will not be loaded unless its 'id' is # mentioned in the enable_list: diff --git a/tasks/install_subapp.yml b/tasks/install_subapp.yml index 4243fcf..3438ce1 100644 --- a/tasks/install_subapp.yml +++ b/tasks/install_subapp.yml @@ -75,7 +75,9 @@ daemon-reload: "true" tags: [systemd] -- name: check which Services are enabled +# We check this using the `command` module, because the `systemd` module fails +# if the unit doesn't exist. Hence, we also ignore the linter warning. +- name: check which Services are enabled # noqa command-instead-of-module ansible.builtin.command: "systemctl is-enabled {{ item }}" loop: - "chmod_sip_uploads.service" diff --git a/tasks/remove_packages.yml b/tasks/remove_packages.yml index a2176b7..eb99441 100644 --- a/tasks/remove_packages.yml +++ b/tasks/remove_packages.yml @@ -2,7 +2,9 @@ ### PAKETDEINSTALLATIONEN ### - name: clamav entfernen block: - - name: clamav Prüfung + # This cannot be done using the `systemd` module, so we ignore the linter + # warning. + - name: clamav Prüfung # noqa command-instead-of-module # command: systemctl list-unit-files | grep clam ansible.builtin.command: systemctl list-unit-files clamav-daemon.service clamav-freshclam.service register: check_clamav_installed -- GitLab