12 lines
458 B
Plaintext
12 lines
458 B
Plaintext
|
{% set copy_=unifi_gateway_config -%}
|
||
|
{% for inf in unifi_gateway_config.interfaces.wireguard %}
|
||
|
{%- set p=[] -%}
|
||
|
{% for peer in unifi_gateway_config.interfaces.wireguard[inf].peer %}
|
||
|
{%- set m=peer.key -%}
|
||
|
{%- set x=peer.pop("key") -%}
|
||
|
{%- set x=(p.append({m: peer})) -%}
|
||
|
{% endfor %}
|
||
|
{%- set x=(unifi_gateway_config.interfaces.wireguard[inf].__setitem__("peer", p)) -%}
|
||
|
{% endfor %}
|
||
|
{{- copy_ | to_json(indent=4) }}
|