Get rid of json_query
This commit is contained in:
parent
ab6b33f4af
commit
8b083f5939
@ -19,9 +19,12 @@ vpn_bridge_prefix: "10.66.{{ vpn_subnet_id }}"
|
|||||||
vpn_bridge_address: "{{ vpn_bridge_prefix }}.1"
|
vpn_bridge_address: "{{ vpn_bridge_prefix }}.1"
|
||||||
vpn_bridge_broadcast: "{{ vpn_bridge_prefix }}.255"
|
vpn_bridge_broadcast: "{{ vpn_bridge_prefix }}.255"
|
||||||
vpn_bridge_netmask: "255.255.255.0"
|
vpn_bridge_netmask: "255.255.255.0"
|
||||||
vpn_bridge_dnat: "{{ services_host_services | dict2items |
|
vpn_bridge_dnat: "\
|
||||||
community.general.json_query('[?@.value.tcp].
|
{% set vpn_bridge_dnat = [] %}\
|
||||||
{address: value.address, ports: value.tcp}') }}"
|
{% for properties in ( services_host_services.values() | selectattr('tcp', 'defined') ) %}\
|
||||||
|
{{ vpn_bridge_dnat.append({ 'address': properties.address, 'ports': properties.tcp }) }}\
|
||||||
|
{% endfor %}\
|
||||||
|
{{ vpn_bridge_dnat }}"
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------
|
||||||
# services
|
# services
|
||||||
|
Loading…
Reference in New Issue
Block a user