38 lines
941 B
YAML
38 lines
941 B
YAML
---
|
|
- name: IPU Upgrade OS Check
|
|
hosts: all
|
|
gather_facts: true
|
|
|
|
tasks:
|
|
- name: Check hostname
|
|
ansible.builtin.debug:
|
|
var: ansible_hostname
|
|
|
|
- name: Toggle IPv6 off
|
|
ansible.builtin.shell:
|
|
cmd: "echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6"
|
|
changed_when: false
|
|
|
|
- name: Disable IPv6 for future reboots
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/sysctl.conf
|
|
line: "net.ipv6.conf.all.disable_ipv6 = 1"
|
|
state: present
|
|
# notify: Sysctl_update
|
|
when:
|
|
- ipu_disable_ipv6 | default(false) | bool
|
|
|
|
- name: Define IP address for NFS export job
|
|
ansible.builtin.set_stats:
|
|
data:
|
|
ip_addresses: "{{ ansible_all_ipv4_addresses }}"
|
|
server_hostname: "{{ ansible_hostname }}"
|
|
aggregate: true
|
|
|
|
|
|
handlers:
|
|
- name: Sysctl_update
|
|
ansible.builtin.command:
|
|
cmd: sysctl -p
|
|
changed_when: false
|