upt playbook

This commit is contained in:
jaydee 2023-08-22 10:13:49 +02:00
parent d279cb35ec
commit 509a9c9633

View File

@ -49,13 +49,9 @@
ignore_errors: yes
when: inventory_hostname in groups['nas']
- name: Display the current timestamp in YYYY-MM-DD
debug:
ts=ansible_date_time.date
- name: Create archive
#ansible.builtin.shell: 'tar -czf /share/Data/dockers.tar.gz /share/docker_data/{mailu2,webhub,ha} --exclude="/ha/backups/*" --exclude="home-assistant.log*"'
ansible.builtin.shell: 'tar -czf /share/Data/dockers-{{ ts }}.tar.gz /share/docker_data/mailu2 --exclude="/ha/backups/*" --exclude="home-assistant.log*"'
ansible.builtin.shell: 'tar -czf /share/Data/dockers-{{ ansible_date_time.date }}.tar.gz /share/docker_data/mailu2 --exclude="/ha/backups/*" --exclude="home-assistant.log*"'
ignore_errors: yes
when: inventory_hostname in groups['nas']