Initial project commit
This commit is contained in:
32
ip-alias-test copy 4.yml
Normal file
32
ip-alias-test copy 4.yml
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
- name: IP Address Alias Testing
|
||||
hosts: ipalias
|
||||
gather_facts: true
|
||||
|
||||
tasks:
|
||||
- name: Display any IP aliases for host
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
IP alias detected for interface '{{ item }}:
|
||||
{{ hostvars[inventory_hostname]['ansible_' + item]['ipv4_secondaries'] }}
|
||||
loop: "{{ ansible_interfaces }}"
|
||||
when:
|
||||
- "'lo' not in item"
|
||||
- hostvars[inventory_hostname]['ansible_' + item]['ipv4_secondaries'] is defined
|
||||
|
||||
|
||||
- name: Log IP alias check to syslogger
|
||||
community.general.syslogger:
|
||||
msg: "{{ inventory_hostname }} has IP aliases defined for {{ item }}."
|
||||
ident: ansbl_ipu_precheck
|
||||
vars:
|
||||
actors: "check_ip_alias_presence"
|
||||
title: >
|
||||
IP address aliases cause conflicts with in place upgrades
|
||||
summary: "IP address aliases not supported after in place upgrade"
|
||||
severity: "high"
|
||||
flags: ["inhibitor"]
|
||||
loop: "{{ ansible_interfaces }}"
|
||||
when:
|
||||
- "'lo' not in item"
|
||||
- hostvars[inventory_hostname]['ansible_' + item]['ipv4_secondaries'] is defined
|
Reference in New Issue
Block a user