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: community.general.archive:
path: "{{ all_env_files.files }}" path: "{{ all_env_files.files }}"
dest: >- 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 format: gz
force_archive: true force_archive: true
- name: Find all .env backup files for the current host - name: Find all .env backup files for the current host
ansible.builtin.find: ansible.builtin.find:
paths: "/backup/env" paths: "/backup"
patterns: "{{ inventory_hostname }}*" patterns: "{{ inventory_hostname }}*"
register: backup_env_files register: backup_env_files

View File

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