New stuffs again
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user