Change directory to local backup path, as email sending is delegated to localhost.

This commit is contained in:
2024-02-24 11:04:02 +01:00
parent 9dc3881659
commit fd366b64ff

View File

@@ -67,7 +67,7 @@
subject: Datenbank Backup subject: Datenbank Backup
body: System {{ ansible_hostname }} has been successfully provisioned. body: System {{ ansible_hostname }} has been successfully provisioned.
attach: attach:
- "{{ backup_dir }}/{{ item.key }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql.gz" - "{{ local_backup }}/{{ item.key }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql.gz"
delegate_to: localhost delegate_to: localhost
when: item.value.email is defined when: item.value.email is defined
loop: "{{ lookup('dict', customers) }}" loop: "{{ lookup('dict', customers) }}"