From dc81e149fff86543e1e584795718273d857abd10 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 9 Apr 2025 13:44:28 -0400 Subject: [PATCH] Further tweaks --- roles/rear_backup/tasks/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/rear_backup/tasks/main.yml b/roles/rear_backup/tasks/main.yml index e866bfb..3419fda 100644 --- a/roles/rear_backup/tasks/main.yml +++ b/roles/rear_backup/tasks/main.yml @@ -15,6 +15,14 @@ cmd: "echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6" changed_when: false +- name: Disable IPv6 for future reboots if requested + ansible.builtin.lineinfile: + path: /etc/sysctl.conf + line: "net.ipv6.conf.all.disable_ipv6 = 1" + state: present + when: + - rear_ipv6_disable_on_boot | default(false) | bool + - name: Check and define NFS server for backup ansible.builtin.include_role: name: rhc.rear.nfs_server_define @@ -61,14 +69,6 @@ when: - rear_config_stat['stat']['exists'] | bool -- name: Disable IPv6 for future reboots if requested - ansible.builtin.lineinfile: - path: /etc/sysctl.conf - line: "net.ipv6.conf.all.disable_ipv6 = 1" - state: present - when: - - rear_ipv6_disable_on_boot | default(false) | bool - - name: ReaR backup success ansible.builtin.debug: msg: "ReaR backup has completed successfully."