fix: change to safely skip task if backupDirectory is not defined (#1003) (#1004)

This commit is contained in:
kurokobo
2022-08-04 23:42:43 +09:00
committed by GitHub
parent 8a3c8e727a
commit f1df88dc53

View File

@@ -14,6 +14,7 @@
- include_tasks: cleanup.yml
vars:
backup_dir: "{{ this_backup['resources'][0]['status']['backupDirectory'] }}"
backup_dir: "{{ this_backup['resources'][0]['status']['backupDirectory'] | default() }}"
when:
- clean_backup_on_delete and backup_dir is defined
- clean_backup_on_delete
- backup_dir | length > 0