From 6a0d65fd6133fc31881a8d75102788f3fc975632 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Sun, 15 Dec 2024 22:03:03 +0500 Subject: [PATCH] Validate backup script before installation --- roles/backups/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/backups/tasks/main.yml b/roles/backups/tasks/main.yml index b566b78..51b3dff 100644 --- a/roles/backups/tasks/main.yml +++ b/roles/backups/tasks/main.yml @@ -50,6 +50,10 @@ - prosody:/data/docker/prosody:ro - synapse:/data/docker/synapse:ro - vaultwarden:/data/docker/vaultwarden:ro +- name: Install shellcheck + become: true + ansible.builtin.apt: + name: shellcheck - name: Copy backup script become: true ansible.builtin.template: @@ -57,6 +61,7 @@ dest: /root/backup.sh mode: "0700" owner: root + validate: shellcheck %s - name: Configure backup job become: true ansible.builtin.cron: