Initial project commit
This commit is contained in:
30
upgradeoscheck.yml
Normal file
30
upgradeoscheck.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: IPv6 Check
|
||||
hosts: ipv6
|
||||
gather_facts: true
|
||||
|
||||
tasks:
|
||||
- name: Check hostname
|
||||
ansible.builtin.debug:
|
||||
var: ansible_hostname
|
||||
|
||||
- name: Check for IPv6 configuration
|
||||
ansible.builtin.shell:
|
||||
cmd: grep -i ipv6 /etc/sysconfig/network-scripts/ifcfg-*
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: ipv6_interfaces
|
||||
|
||||
- name: Debug ipv6_interfaces
|
||||
ansible.builtin.debug:
|
||||
var: ipv6_interfaces
|
||||
when:
|
||||
- ipv6_interfaces['stdout_lines'] is defined
|
||||
- ipv6_interfaces['stdout_lines'] | length > 0
|
||||
|
||||
- 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
|
Reference in New Issue
Block a user