diff --git a/tasks/main.yml b/tasks/main.yml index 2d939e6c8204d157ac437603ed7ef0a6baa54dbe..1d421aba2966c8b54eaa638d09cdaceb6b292213 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -108,7 +108,7 @@ template_backup_account: "{{ item_account_instance.0 }}" template_metabase_instance: "{{ metabase_instance }}" ansible.builtin.cron: - name: "backup {{ template_metabase_instance.key }}{{ template_backup_account.key }}" + name: "backup metabase_{{ template_metabase_instance.key }}{{ template_backup_account.key }}" minute: "{{ '%H' | strftime((('1970-01-01 ' + backup_time_start) | to_datetime).timestamp() + (swift_metabase_accounts | length - template_backup_account.key) * ((backup_time_slot_duration | community.general.to_seconds - swift_metabase_accounts | length * backup_time_max_duration | community.general.to_seconds) / (swift_metabase_accounts | length - 1) + backup_time_max_duration | community.general.to_seconds) | int) }}" hour: "{{ '%H' | strftime((('1970-01-01 ' + backup_time_start) | to_datetime).timestamp() + (swift_metabase_accounts | length - template_backup_account.key) * ((backup_time_slot_duration | community.general.to_seconds - swift_metabase_accounts | length * backup_time_max_duration | community.general.to_seconds) / (swift_metabase_accounts | length - 1) + backup_time_max_duration | community.general.to_seconds) | int) }}" job: "/usr/bin/docker compose -f /home/docker/backups/backup-metabase_{{ template_metabase_instance.key }}{{ template_backup_account.key }}.yaml run --rm backup_metabase"