Skip to content

Commit

Permalink
Allow role usage with Python 3 (#32)
Browse files Browse the repository at this point in the history
In Python 3, iteritems() doesn't exist anymore. A simple fix is to switch to items() instead which is available both in versions 2 & 3.
  • Loading branch information
rborer authored and tersmitten committed Dec 14, 2018
1 parent a197e66 commit 4c13332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/etc/keepalived/keepalived.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ global_defs {
{% endif %}
}

{% for key, value in keepalived_vrrp_scripts.iteritems() %}
{% for key, value in keepalived_vrrp_scripts.items() %}
vrrp_script {{ key }} {
script "{{ value.script }}"
{% if value.weight is defined %}
Expand All @@ -42,7 +42,7 @@ vrrp_script {{ key }} {
}
{% endfor %}

{% for key, value in keepalived_vrrp_instances.iteritems() %}
{% for key, value in keepalived_vrrp_instances.items() %}
vrrp_instance {{ key }} {
interface {{ value.interface }}
state {{ value.state }}
Expand Down

0 comments on commit 4c13332

Please sign in to comment.