ENV backup fixes

This commit is contained in:
Bradley Bickford 2025-08-25 20:40:31 -04:00
parent 5bd16afc90
commit 104cc97f96
2 changed files with 3 additions and 4 deletions

View File

@ -161,13 +161,13 @@
community.general.archive:
path: "{{ all_env_files.files }}"
dest: >-
/backup/env/{{ inventory_hostname }}_{{ now().strftime("%Y%m%d%H%M%S") }}.tar.gz
/backup/{{ inventory_hostname }}_{{ now().strftime("%Y%m%d%H%M%S") }}.tar.gz
format: gz
force_archive: true
- name: Find all .env backup files for the current host
ansible.builtin.find:
paths: "/backup/env"
paths: "/backup"
patterns: "{{ inventory_hostname }}*"
register: backup_env_files

View File

@ -27,8 +27,7 @@
community.general.archive:
path: "{{ backup_rules.directories_to_backup }}"
dest: >-
{{ backup_rules.backup_dir }}/{{ backup_rules.backup_name_prefix }}_
{{ now().strftime("%Y%m%d%H%M%S") }}.tar.gz
{{ backup_rules.backup_dir }}/{{ backup_rules.backup_name_prefix }}_{{ now().strftime("%Y%m%d%H%M%S") }}.tar.gz
format: gz
async: 3600
poll: 60