Validate backup script before installation

This commit is contained in:
Ivan R. 2024-12-15 22:03:03 +05:00
parent 615a786a67
commit 6a0d65fd61
Signed by: lumin
GPG key ID: E0937DC7CD6D3817

View file

@ -50,6 +50,10 @@
- prosody:/data/docker/prosody:ro - prosody:/data/docker/prosody:ro
- synapse:/data/docker/synapse:ro - synapse:/data/docker/synapse:ro
- vaultwarden:/data/docker/vaultwarden:ro - vaultwarden:/data/docker/vaultwarden:ro
- name: Install shellcheck
become: true
ansible.builtin.apt:
name: shellcheck
- name: Copy backup script - name: Copy backup script
become: true become: true
ansible.builtin.template: ansible.builtin.template:
@ -57,6 +61,7 @@
dest: /root/backup.sh dest: /root/backup.sh
mode: "0700" mode: "0700"
owner: root owner: root
validate: shellcheck %s
- name: Configure backup job - name: Configure backup job
become: true become: true
ansible.builtin.cron: ansible.builtin.cron: