Extract asserts into their own file

These don't really belong in the "install" file.
This commit is contained in:
AJ Jordan 2025-03-30 02:22:08 -04:00 committed by Manu
parent 781f1226e7
commit e179627077
2 changed files with 9 additions and 8 deletions

9
tasks/00_assert.yml Normal file
View File

@ -0,0 +1,9 @@
---
- name: Ensure legacy hooks aren't used
ansible.builtin.assert:
that:
- borgmatic_failure_command is undefined
- borgmatic_before_backup_command is undefined
- borgmatic_after_backup_command is undefined
msg: Please use the new borgmatic_hooks variable instead of individual before/after/failure hooks.
...

View File

@ -1,14 +1,6 @@
---
- name: Install borgbackup
block:
- name: Ensure legacy hooks aren't used
ansible.builtin.assert:
that:
- borgmatic_failure_command is undefined
- borgmatic_before_backup_command is undefined
- borgmatic_after_backup_command is undefined
msg: Please use the new borgmatic_hooks variable instead of individual before/after/failure hooks.
- name: Include OS-specific variables
include_vars: "{{ item }}"
with_first_found: