Übernahme aus privaten Projekt.

This commit is contained in:
Olli Graf
2026-01-01 15:47:07 +01:00
parent da36d7ce1e
commit 83fa6e138b
20 changed files with 305 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
- name: Sichere Verzeichnisse
become: true
ansible.builtin.command:
cmd: >
tar
--create
--gzip
--file {{ backup_host_dir }}/{{ item }}.tar.gz
--preserve-permissions
--same-owner
--numeric-owner
-C /
{{ item }}
args:
creates: "{{ backup_host_dir }}/{{ item }}.tar.gz"
tags: backup
loop: "{{ backupdirs }}"
when: ansible_facts.lsb.codename in ["bookworm", "bullseye"]