Replace matrix-backup-borg with an external role

This commit is contained in:
Slavi Pantaleev
2023-02-13 10:53:11 +02:00
parent f81aa4a927
commit 78c35136b2
16 changed files with 57 additions and 447 deletions

View File

@ -5,3 +5,6 @@ matrix_playbook_migration_matrix_prometheus_node_exporter_migration_validation_e
# Controls if (`matrix_prometheus_postgres_exporter` -> `prometheus_postgres_exporter`) validation will run.
matrix_playbook_migration_matrix_prometheus_postgres_exporter_migration_validation_enabled: true
# Controls if (`matrix_backup_borg` -> `backup_borg`) validation will run.
matrix_playbook_migration_matrix_backup_borg_migration_validation_enabled: true

View File

@ -80,3 +80,20 @@
Please change your configuration (vars.yml) to rename all variables (`matrix_prometheus_postgres_exporter_` -> `prometheus_postgres_exporter_`).
We found usage of the following variables: {{ matrix_playbook_migration_matrix_prometheus_postgres_exporter_migration_vars.keys() | join(', ') }}
when: "matrix_playbook_migration_matrix_prometheus_postgres_exporter_migration_vars | length > 0"
- when: matrix_playbook_migration_matrix_backup_borg_migration_validation_enabled | bool
block:
- ansible.builtin.set_fact:
matrix_playbook_migration_backup_borg_migration_vars: |-
{{ vars | dict2items | selectattr('key', 'match', 'matrix_backup_borg_.*') | list | items2dict }}
- name: (Deprecation) Catch and report matrix_backup_borg variables
ansible.builtin.fail:
msg: >-
The matrix-backup-borg role that used to be part of this playbook has been replaced by https://gitlab.com/etke.cc/roles/backup_borg.
The new role is compatible with the old one, but uses different names for its variables.
Please change your configuration (vars.yml) to rename all variables (`matrix_backup_borg_` -> `backup_borg_`).
We found usage of the following variables: {{ matrix_playbook_migration_backup_borg_migration_vars.keys() | join(', ') }}
when: "matrix_playbook_migration_backup_borg_migration_vars | length > 0"