- 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"]