Skip to content
Snippets Groups Projects
Commit 0039ac7a authored by MyIgel's avatar MyIgel :fire:
Browse files

Fixed pillar on new hosts without config

parent f4da4fb2
Branches
No related tags found
No related merge requests found
Pipeline #30330 passed
{%- set interfaces = [] -%}
{%- for name, interface in pillar.ifaces.items() if 'type' in interface -%}
{%- for name, interface in pillar.get('ifaces', {}).items() if 'type' in interface -%}
{%- if interface.type == "transit" or interface.type == "ixp" or interface.type == "pni"-%}
{%- do interfaces.append(name|replace('*', '+')) -%}
{%- endif -%}
......
{%- set interfaces = [] -%}
{%- for name, interface in pillar.ifaces.items() if 'lldp' in interface -%}
{%- for name, interface in pillar.get('ifaces', {}).items() if 'lldp' in interface -%}
{%- do interfaces.append(name) -%}
{%- endfor -%}
......
{%- set interfaces = [] -%}
{%- for name, interface in pillar.ifaces.items() if 'lldp' in interface -%}
{%- for name, interface in pillar.get('ifaces', {}).items() if 'lldp' in interface -%}
{%- do interfaces.append(name) -%}
{%- endfor -%}
{%- if interfaces|length > 0 -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment