Clean up variable naming

This commit is contained in:
Wojciech Kozlowski 2022-12-18 02:07:29 +01:00
parent d55e0b77af
commit ab6b33f4af
4 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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 }}"