New stuffs again

This commit is contained in:
2025-07-08 10:50:08 -04:00
parent 7502dbbd84
commit 49b98451a3
16 changed files with 548 additions and 31 deletions

View File

@ -13,20 +13,20 @@
- "'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 }}."
msg: "{{ lookup('template', 'syslog.j2') | replace('\n', ' ') }}"
ident: ansbl_ipu_precheck
vars:
actor: "check_ip_aliases"
title: "Use of IP aliases detected"
summary: "IP alias in use for interface: {{ ipv4_item }}"
severity: "high"
flags: ["inhibitor"]
loop: "{{ ansible_interfaces }}"
loop_control:
loop_var: ipv4_item
when:
- "'lo' not in ipv4_item"
- hostvars[inventory_hostname]['ansible_' + ipv4_item]['ipv4_secondaries'] is defined
# - name: Log IP alias check to syslogger
# community.general.syslogger:
# # msg: "{{ inventory_hostname }} has IP aliases defined for {{ item }}."
# msg: "{{ lookup('template', 'syslog.j2') | replace('\n', ' ') }}"
# ident: ansbl_ipu_precheck
# vars:
# actor: "check_ip_aliases"
# title: "Use of IP aliases detected"
# summary: "IP alias in use for interface: {{ ipv4_item }}"
# severity: "high"
# flags: ["inhibitor"]
# loop: "{{ ansible_interfaces }}"
# loop_control:
# loop_var: ipv4_item
# when:
# - "'lo' not in ipv4_item"
# - hostvars[inventory_hostname]['ansible_' + ipv4_item]['ipv4_secondaries'] is defined