From 390c780b24538716c4aa45e97ba8c8916b89998c Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 10 Jan 2022 14:31:25 +0100 Subject: [PATCH] Skip linting for selected tasks --- handlers/main.yml | 1 + tasks/delete_legacy_cron_entry.yml | 1 + tasks/restic_delete_systemd.yml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index f1799ec..43648a3 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -8,6 +8,7 @@ masked: false with_items: '{{ restic_backups }}' ignore_errors: true + tags: skip_ansible_lint when: - restic_create_schedule - item.name is defined diff --git a/tasks/delete_legacy_cron_entry.yml b/tasks/delete_legacy_cron_entry.yml index 780fab4..4920331 100644 --- a/tasks/delete_legacy_cron_entry.yml +++ b/tasks/delete_legacy_cron_entry.yml @@ -27,6 +27,7 @@ - item.scheduled | default(false) - ansible_service_mgr != 'systemd' or restic_force_cron | default(false) or restic_schedule_type == "cronjob" ignore_error: true + tags: skip_ansible_lint register: cron_delete - name: "(SCHEDULE) (OLD) make sure 'do1jlr.restic backup {{ item.name }}' is not in /etc/crontab" diff --git a/tasks/restic_delete_systemd.yml b/tasks/restic_delete_systemd.yml index 4bf62ab..6a60695 100644 --- a/tasks/restic_delete_systemd.yml +++ b/tasks/restic_delete_systemd.yml @@ -11,6 +11,7 @@ masked: false with_items: '{{ restic_backups }}' ignore_errors: true + tags: skip_ansible_lint failed_when: false changed_when: false when: @@ -33,6 +34,7 @@ - restic_schedule_type == "cronjob" or restic_force_cron | default(false) ignore_errors: true failed_when: false + tags: skip_ansible_lint changed_when: false - name: (SCHEDULE) (SYSTEMD) delete systemd .timer file