From 056ad0cf2dcfea82f5f67960a78c49f2b694c19e Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 14 Mar 2024 11:12:51 -0400 Subject: [PATCH] logic fix --- roles/rear_backup/tasks/main.yml | 2 +- roles/rear_backup/templates/local.conf.j2 | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/roles/rear_backup/tasks/main.yml b/roles/rear_backup/tasks/main.yml index ec89fe9..bc30c5a 100644 --- a/roles/rear_backup/tasks/main.yml +++ b/roles/rear_backup/tasks/main.yml @@ -9,7 +9,7 @@ - name: Execute ReaR backup ansible.builtin.debug: - msg: "Executing ReaR backup explicitly including the '{{ bigboot_lv_vg_name | trim }}' logical volume." + msg: "Executing ReaR backup explicitly including the '{{ bigboot_lv_vg_name | default('unknown') | trim }}' logical volume." ... diff --git a/roles/rear_backup/templates/local.conf.j2 b/roles/rear_backup/templates/local.conf.j2 index 6b00f99..9af5a0b 100644 --- a/roles/rear_backup/templates/local.conf.j2 +++ b/roles/rear_backup/templates/local.conf.j2 @@ -2,10 +2,16 @@ # *** MANAGED BY ANSIBLE - DO NOT MODIFY *** # ############################################## + + + + + OUTPUT=ISO OUTPUT_URL=nfs://{{ rear_nfs_srv }} BACKUP=NETFS BACKUP_URL=nfs://{{ rear_nfs_srv }} +# SSH_ROOT_PASSWORD="bob" USE_STATIC_NETWORKING=yes CLONSE_ALL_USERS_GROUPS=yes SSH_FILES=yes @@ -19,7 +25,7 @@ ONLY_INCLUDE_VG=( "system" ) {% else %} ONLY_INCLUDE_VG=( "system" {% if bigboot_lv_vg_name is defined %}"{{ bigboot_lv_vg_name | trim }}" {% endif -%} ) {% endif %} -{% if bigboot_lv_info.mount != '/applog' %} +{% if bigboot_lv_info['mount'] is not defined or (bigboot_lv_info['mount'] is defined and bigboot_lv_info['mount'] != '/applog') %} BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/applog' ) EXCLUDE_MOUNTPOINTS=( "${EXCLUDE_MOUNTPOINTS[@]" '/applog' ) EXCLUDE_BACKUP=("${EXCLUDE_BACKUP[@]}" fs:/applog )