33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- 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
|