remove ipv6 check; remove notify

This commit is contained in:
2025-04-09 11:09:00 -04:00
parent 40f14e2ef7
commit f71c2348b1
3 changed files with 26 additions and 18 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
roles roles
collections collections
*copy.yml

View File

@ -13,15 +13,15 @@
- floppy - floppy
- pata_acpi - pata_acpi
- name: Disable IPv6 (will be left disabled post-IPU) # - name: Disable IPv6 (will be left disabled post-IPU)
ansible.builtin.blockinfile: # ansible.builtin.blockinfile:
path: /etc/sysctl.conf # path: /etc/sysctl.conf
block: | # block: |
net.ipv6.conf.all.disable_ipv6 = 1 # net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1 # net.ipv6.conf.default.disable_ipv6 = 1
notify: Sysctl_update # notify: Sysctl_update
when: # when:
- ipu_disable_ipv6 | default(false) | bool # - ipu_disable_ipv6 | default(false) | bool
- name: Leapp Pre-Upgrade - name: Leapp Pre-Upgrade
block: block:

View File

@ -8,19 +8,19 @@
ansible.builtin.debug: ansible.builtin.debug:
var: ansible_hostname var: ansible_hostname
- name: Check for IPv6 configuration - name: Toggle IPv6 off
ansible.builtin.shell: ansible.builtin.shell:
cmd: grep -i ipv6 /etc/sysconfig/network-scripts/ifcfg-* cmd: "echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6"
failed_when: false
changed_when: false changed_when: false
register: ipv6_interfaces
- name: Debug ipv6_interfaces - name: Disable IPv6 for future reboots
ansible.builtin.debug: ansible.builtin.lineinfile:
var: ipv6_interfaces path: /etc/sysctl.conf
line: "net.ipv6.conf.all.disable_ipv6 = 1"
state: present
# notify: Sysctl_update
when: when:
- ipv6_interfaces['stdout_lines'] is defined - ipu_disable_ipv6 | default(false) | bool
- ipv6_interfaces['stdout_lines'] | length > 0
- name: Define IP address for NFS export job - name: Define IP address for NFS export job
ansible.builtin.set_stats: ansible.builtin.set_stats:
@ -28,3 +28,10 @@
ip_addresses: "{{ ansible_all_ipv4_addresses }}" ip_addresses: "{{ ansible_all_ipv4_addresses }}"
server_hostname: "{{ ansible_hostname }}" server_hostname: "{{ ansible_hostname }}"
aggregate: true aggregate: true
handlers:
- name: Sysctl_update
ansible.builtin.command:
cmd: sysctl -p
changed_when: false