Add some stuff; remove some stuff
This commit is contained in:
parent
a3e931188f
commit
e45e47090c
@ -16,3 +16,6 @@
|
|||||||
- name: Include the backup role
|
- name: Include the backup role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: ../roles/rear_backup
|
name: ../roles/rear_backup
|
||||||
|
when:
|
||||||
|
- ansible_distribution_major_version == '7'
|
||||||
|
- not rear_backup_skip | default(false) | bool
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
rear_nfs_srv: "10.10.42.180"
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# handlers file for rear_backup
|
|
@ -1,4 +1,19 @@
|
|||||||
---
|
---
|
||||||
|
- name: Check connectivity to NFS servers
|
||||||
|
ansible.builtin.wait_for:
|
||||||
|
host: "{{ item }}"
|
||||||
|
port: 2049
|
||||||
|
timeout: 30
|
||||||
|
loop: "{{ nfs_np }}"
|
||||||
|
ignore_errors: true
|
||||||
|
register: active_nfs_servers
|
||||||
|
|
||||||
|
- name: Define single NFS server
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
nfs_srv: "{{ active_nfs_servers | json_query(_nfs_query) | random }}"
|
||||||
|
vars:
|
||||||
|
_nfs_query: "results[?failed=='false'].item"
|
||||||
|
|
||||||
- name: Create /etc/rear if it doesn't exist
|
- name: Create /etc/rear if it doesn't exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/rear
|
path: /etc/rear
|
||||||
@ -7,7 +22,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Update ReaR configuration file
|
- name: Configure ReaR local.conf file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: local.conf.j2
|
src: local.conf.j2
|
||||||
dest: /etc/rear/local.conf
|
dest: /etc/rear/local.conf
|
||||||
@ -16,8 +31,6 @@
|
|||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|
||||||
- name: ReaR Backup
|
- name: ReaR Backup
|
||||||
when:
|
|
||||||
- rear_force_backup | default(false) | bool
|
|
||||||
block:
|
block:
|
||||||
# - name: Execute ReaR backup
|
# - name: Execute ReaR backup
|
||||||
# ansible.builtin.command: rear -d -v mkbackup
|
# ansible.builtin.command: rear -d -v mkbackup
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
OUTPUT=ISO
|
OUTPUT=ISO
|
||||||
OUTPUT_URL=nfs://{{ rear_nfs_srv }}
|
OUTPUT_URL=nfs://{{ nfs_srv }}{{ rear_nfs_export_share }}
|
||||||
BACKUP=NETFS
|
BACKUP=NETFS
|
||||||
BACKUP_URL=nfs://{{ rear_nfs_srv }}
|
BACKUP_URL=nfs://{{ nfs_srv }}
|
||||||
# SSH_ROOT_PASSWORD="bob"
|
# SSH_ROOT_PASSWORD="bob"
|
||||||
USE_STATIC_NETWORKING=yes
|
USE_STATIC_NETWORKING=yes
|
||||||
CLONES_ALL_USERS_GROUPS=yes
|
CLONES_ALL_USERS_GROUPS=yes
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
##############################################
|
|
||||||
# *** 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
|
|
||||||
CLONES_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
|
|
||||||
# REAR_INITRD_COMPRESSION="lzma"
|
|
||||||
# FIRMWARE_FILES=('no')
|
|
||||||
# MODULES=('loaded_modules')
|
|
||||||
{% if rear_backup_initrd_modules_exclude is defined %}
|
|
||||||
EXCLUDE_MODULES=( {{ rear_backup_initrd_modules_exclude | join(' ') }} )
|
|
||||||
{% endif %}
|
|
||||||
{% if bigboot_lv_vg_name is defined and bigboot_lv_vg_name|trim == "system" %}
|
|
||||||
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'] 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 )
|
|
||||||
{% endif %}
|
|
@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- rear_backup
|
|
@ -1,2 +1,11 @@
|
|||||||
---
|
---
|
||||||
# vars file for rear_backup
|
nfs_np:
|
||||||
|
- 10.10.42.180
|
||||||
|
|
||||||
|
nfs_prod:
|
||||||
|
- 10.10.42.180
|
||||||
|
|
||||||
|
rear_nfs_export_share: /backups/standalone
|
||||||
|
|
||||||
|
rear_grub_label: 'Relax-and-Recover *** RESTORES RHEL7 ***'
|
||||||
|
rear_grub_conf: /etc/grub/45_rear
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# defaults file for rear_restore
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# handlers file for rear_restore
|
|
@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- rear_restore
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for rear_restore
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# defaults file for say_hi
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# handlers file for say_hi
|
|
@ -1,2 +0,0 @@
|
|||||||
localhost
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
remote_user: root
|
|
||||||
roles:
|
|
||||||
- say_hi
|
|
Loading…
x
Reference in New Issue
Block a user