Merge pull request #1112 from zhsj/fix-py3

fix python3 compatibility in jinja2 template.
pull/1115/head
Sébastien Han 2016-11-22 18:07:09 +01:00 committed by GitHub
commit c8c927faeb
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ mon host = {% for host in groups[mon_group_name] %}
{% set address = hostvars[host]['monitor_address'] if hostvars[host]['monitor_address'] is defined else monitor_address %}
{% set interface = hostvars[host]['monitor_interface'] if hostvars[host]['monitor_interface'] is defined else monitor_interface %}
{% if interface != "interface" %}
{% for key in hostvars[host].iterkeys() %}
{% for key in hostvars[host].keys() %}
{% if hostvars[host][key]['macaddress'] is defined and hostvars[host][key]['device'] is defined and hostvars[host][key]['device'] == interface -%}
{{ hostvars[host][key]['ipv4']['address'] }}
{%- endif %}