iterate in a manner compatible with both salt-ssh and salttags/v2.1.1
{%- for interface_name, interface_dict in salt.pillar.get('wireguard:interfaces', {}).items() %} | |||||
{%- for interface_name, interface_dict in salt['pillar.get']('wireguard:interfaces', {}).items() %} | |||||
{% if interface_dict.get('delete', False) %} | {% if interface_dict.get('delete', False) %} | ||||
stop and disable wg-quick@{{interface_name}}: | stop and disable wg-quick@{{interface_name}}: |