From db88c6c6ab1387f02b8b52941b28538a908d1415 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 13 Mar 2024 19:06:08 -0400 Subject: [PATCH] add local.conf update to tasks --- roles/rear_backup/tasks/main.yml | 8 ++++++++ roles/rear_backup/templates/local.conf.j2 | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 roles/rear_backup/templates/local.conf.j2 diff --git a/roles/rear_backup/tasks/main.yml b/roles/rear_backup/tasks/main.yml index 928adc5..4a9a778 100644 --- a/roles/rear_backup/tasks/main.yml +++ b/roles/rear_backup/tasks/main.yml @@ -1,4 +1,12 @@ --- +- name: Update ReaR configuration file + ansible.builtin.template: + src: local.conf.j2 + dest: /etc/rear/local.conf + owner: root + group: root + mode: "0600" + - name: Execute ReaR backup ansible.builtin.debug: msg: "Executing ReaR backup explicitly including the '{{ bigboot_adjacent_lvm_device }}' logical volume." diff --git a/roles/rear_backup/templates/local.conf.j2 b/roles/rear_backup/templates/local.conf.j2 new file mode 100644 index 0000000..435c784 --- /dev/null +++ b/roles/rear_backup/templates/local.conf.j2 @@ -0,0 +1,22 @@ +############################################## +# *** MANAGED BY ANSIBLE - DO NOT MODIFY *** # +############################################## + +OUTPUT=ISO +OUTPUT_URL=nfs://{{ rear_nfs_srv }} +BACKUP=NETFS +BACKUP_URL=nfs://{{ rear_nfs_srv }} +USE_STATIC_NETWORKING=yes +CLONSE_ALL_USERS_GROUPS=yes +SSH_FILES=yes +SSH_UNPROTECTED_PRIVATE_KEYS=yes +GRUB_RESCUE=1 +KERNEL_CMDLINE="unattended" +USER_INPUT_TIMEOUT=1 +USER_INPUT_DISK_LAYOUT_PROCEED_RECOVERY=yes +ONLY_INCLUDE_VG=( "system" {% if bigboot_lv_vg_name is defined %}"{{ bigboot_lv_vg_name }}" {% endif -%} ) +{% if bigboot_lv_info.mount != '/lv1' %} +BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/applog' ) +EXCLUDE_MOUNTPOINTS=( "${EXCLUDE_MOUNTPOINTS[@]" '/applog' ) +EXCLUDE_BACKUP=("${EXCLUDE_BACKUP[@]}" fs:/applog ) +{% endif %}