replace all occurrences of iteritems()
with items()
as it was removed in Python 3
This commit is contained in:
parent
30b5a5e4eb
commit
1af52aad51
9 changed files with 9 additions and 9 deletions
|
@ -60,7 +60,7 @@ ip -6 rule add from all iif {{ mesh.id }}br type unreachable priority 61
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
ip -4 rule add from all iif icvpn type unreachable priority 61
|
ip -4 rule add from all iif icvpn type unreachable priority 61
|
||||||
ip -4 rule add from all iif {{ ansible_default_ipv4.interface }} type unreachable priority 61
|
ip -4 rule add from all iif {{ ansible_default_ipv4.interface }} type unreachable priority 61
|
||||||
{% for server_id, server_value in ffrl_exit_server.iteritems() %}
|
{% for server_id, server_value in ffrl_exit_server.items() %}
|
||||||
ip -4 rule add from all iif {{ server_id }} type unreachable priority 61
|
ip -4 rule add from all iif {{ server_id }} type unreachable priority 61
|
||||||
ip -6 rule add from all iif {{ server_id }} type unreachable priority 61
|
ip -6 rule add from all iif {{ server_id }} type unreachable priority 61
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -60,7 +60,7 @@ ip -6 rule del from all iif {{ mesh.id }}br type unreachable priority 61
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
ip -4 rule del from all iif icvpn type unreachable priority 61
|
ip -4 rule del from all iif icvpn type unreachable priority 61
|
||||||
ip -4 rule del from all iif {{ ansible_default_ipv4.interface }} type unreachable priority 61
|
ip -4 rule del from all iif {{ ansible_default_ipv4.interface }} type unreachable priority 61
|
||||||
{% for server_id, server_value in ffrl_exit_server.iteritems() %}
|
{% for server_id, server_value in ffrl_exit_server.items() %}
|
||||||
ip -4 rule del from all iif {{ server_id }} type unreachable priority 61
|
ip -4 rule del from all iif {{ server_id }} type unreachable priority 61
|
||||||
ip -6 rule del from all iif {{ server_id }} type unreachable priority 61
|
ip -6 rule del from all iif {{ server_id }} type unreachable priority 61
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -18,7 +18,7 @@ function is_ffrl_nat() {
|
||||||
|
|
||||||
function is_ffrl_tunnel_nets() {
|
function is_ffrl_tunnel_nets() {
|
||||||
return net ~ [
|
return net ~ [
|
||||||
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
|
{% for peer_id, peer_value in ffrl_exit_server.items() %}
|
||||||
{{ peer_value.tunnel_ipv4_network }}{{ "," if not loop.last else "" }}
|
{{ peer_value.tunnel_ipv4_network }}{{ "," if not loop.last else "" }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
#
|
#
|
||||||
|
|
||||||
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
|
{% for peer_id, peer_value in ffrl_exit_server.items() %}
|
||||||
protocol bgp '{{ peer_id }}' from ffrl_uplink {
|
protocol bgp '{{ peer_id }}' from ffrl_uplink {
|
||||||
source address {{ peer_value.tunnel_ipv4_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }};
|
source address {{ peer_value.tunnel_ipv4_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }};
|
||||||
neighbor {{ peer_value.tunnel_ipv4_network | ipaddr('net') | ipaddr('address') }} as ffrl_as;
|
neighbor {{ peer_value.tunnel_ipv4_network | ipaddr('net') | ipaddr('address') }} as ffrl_as;
|
||||||
|
|
|
@ -20,7 +20,7 @@ function is_ffrl_public_nets() {
|
||||||
|
|
||||||
function is_ffrl_tunnel_nets() {
|
function is_ffrl_tunnel_nets() {
|
||||||
return net ~ [
|
return net ~ [
|
||||||
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
|
{% for peer_id, peer_value in ffrl_exit_server.items() %}
|
||||||
{{ peer_value.tunnel_ipv6_network }}{{ "," if not loop.last else "" }}
|
{{ peer_value.tunnel_ipv6_network }}{{ "," if not loop.last else "" }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
#
|
#
|
||||||
|
|
||||||
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
|
{% for peer_id, peer_value in ffrl_exit_server.items() %}
|
||||||
protocol bgp '{{ peer_id }}' from ffrl_uplink {
|
protocol bgp '{{ peer_id }}' from ffrl_uplink {
|
||||||
source address {{ peer_value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }};
|
source address {{ peer_value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }};
|
||||||
neighbor {{ peer_value.tunnel_ipv6_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }} as ffrl_as;
|
neighbor {{ peer_value.tunnel_ipv6_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }} as ffrl_as;
|
||||||
|
|
|
@ -10,7 +10,7 @@ protocol bgp mwu_{{ gateway.rsplit('.freifunk-mwu.de')[0] }} from ibgp_mwu {
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for item, value in bgp_mwu_servers.iteritems() %}
|
{% for item, value in bgp_mwu_servers.items() %}
|
||||||
{% if item != inventory_hostname_short %}
|
{% if item != inventory_hostname_short %}
|
||||||
protocol bgp mwu_{{ item }} from ibgp_mwu {
|
protocol bgp mwu_{{ item }} from ibgp_mwu {
|
||||||
neighbor {{ value.ipv4 }} as mwu_as;
|
neighbor {{ value.ipv4 }} as mwu_as;
|
||||||
|
|
|
@ -10,7 +10,7 @@ protocol bgp mwu_{{ gateway.rsplit('.freifunk-mwu.de')[0] }} from ibgp_mwu {
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for item, value in bgp_mwu_servers.iteritems() %}
|
{% for item, value in bgp_mwu_servers.items() %}
|
||||||
{% if item != inventory_hostname_short %}
|
{% if item != inventory_hostname_short %}
|
||||||
protocol bgp mwu_{{ item }} from ibgp_mwu {
|
protocol bgp mwu_{{ item }} from ibgp_mwu {
|
||||||
neighbor {{ value.ipv6 }} as mwu_as;
|
neighbor {{ value.ipv6 }} as mwu_as;
|
||||||
|
|
|
@ -11,7 +11,7 @@ global:
|
||||||
{% if prometheus_rule_files is defined %}
|
{% if prometheus_rule_files is defined %}
|
||||||
# Rule files specifies a list of files from which rules are read.
|
# Rule files specifies a list of files from which rules are read.
|
||||||
rule_files:
|
rule_files:
|
||||||
{% for (key, value) in prometheus_rule_files.iteritems() %}
|
{% for (key, value) in prometheus_rule_files.items() %}
|
||||||
- {{ prometheus_rule_path }}/{{ value.dest }}
|
- {{ prometheus_rule_path }}/{{ value.dest }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue