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 %}