From ab6b33f4af42dda6907a359836305fdec0535313 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sun, 18 Dec 2022 02:07:29 +0100 Subject: [PATCH] Clean up variable naming --- plays/backups/roles/snapshots/files/syncoid-batch | 4 ++-- plays/services/roles/backups/tasks/include/snapshots.yml | 4 ++-- .../templates/snapshots/syncoid-volumes-service.yml.j2 | 4 ++-- plays/services/roles/backups/vars/main.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plays/backups/roles/snapshots/files/syncoid-batch b/plays/backups/roles/snapshots/files/syncoid-batch index 18442eb..0b13f66 100644 --- a/plays/backups/roles/snapshots/files/syncoid-batch +++ b/plays/backups/roles/snapshots/files/syncoid-batch @@ -23,7 +23,7 @@ def load_and_validate_config_file(config_file_path): with open(config_file_path, encoding="utf-8") as config_file: config = yaml.safe_load(config_file) - for key in ["dataset", "syncoid_dataset"]: + for key in ["dataset", "backup_dataset"]: if key not in config: raise KeyError(f"{key} must be present in {config_file_path}") @@ -45,6 +45,6 @@ if __name__ == "__main__": if config.get("skip_parent", False): syncoid_cmd.append("--skip-parent") syncoid_cmd.append(config["dataset"]) - syncoid_cmd.append(config["syncoid_dataset"]) + syncoid_cmd.append(config["backup_dataset"]) subprocess.run(syncoid_cmd, check=True) diff --git a/plays/services/roles/backups/tasks/include/snapshots.yml b/plays/services/roles/backups/tasks/include/snapshots.yml index 6cd9437..36d68b8 100644 --- a/plays/services/roles/backups/tasks/include/snapshots.yml +++ b/plays/services/roles/backups/tasks/include/snapshots.yml @@ -4,12 +4,12 @@ insertbefore: "# BEGIN ANSIBLE MANAGED BLOCK TEMPLATES #" marker: "# {mark} ANSIBLE MANAGED BLOCK SERVICE {{ services_service_name }} #" block: | - [{{ services_backups_user_dataset }}] + [{{ services_backups_user_data_dataset }}] use_template = production recursive = yes process_children_only = yes - [{{ services_backups_user_syncoid_dataset }}] + [{{ services_backups_backup_user_data_dataset }}] use_template = backup recursive = yes process_children_only = yes diff --git a/plays/services/roles/backups/templates/snapshots/syncoid-volumes-service.yml.j2 b/plays/services/roles/backups/templates/snapshots/syncoid-volumes-service.yml.j2 index 2fa7c81..2c758e1 100644 --- a/plays/services/roles/backups/templates/snapshots/syncoid-volumes-service.yml.j2 +++ b/plays/services/roles/backups/templates/snapshots/syncoid-volumes-service.yml.j2 @@ -1,4 +1,4 @@ -dataset: {{ services_backups_user_dataset }} -syncoid_dataset: {{ services_backups_user_syncoid_dataset }} +dataset: {{ services_backups_user_data_dataset }} +backup_dataset: {{ services_backups_backup_user_data_dataset }} recursive: true skip_parent: true diff --git a/plays/services/roles/backups/vars/main.yml b/plays/services/roles/backups/vars/main.yml index e0f359b..3bfb9dd 100644 --- a/plays/services/roles/backups/vars/main.yml +++ b/plays/services/roles/backups/vars/main.yml @@ -1,3 +1,3 @@ -services_backups_user_dataset: "{{ services_data_dataset }}/{{ services_service_user_name }}" -services_backups_user_syncoid_dataset: "\ +services_backups_user_data_dataset: "{{ services_data_dataset }}/{{ services_service_user_name }}" +services_backups_backup_user_data_dataset: "\ {{ services_backups_backup_data_dataset }}/{{ services_service_user_name }}"