From 3e06e3955044a746ee6fcf15f7692f1f55d97021 Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Tue, 22 Nov 2016 21:52:52 +0800 Subject: [PATCH] fix python3 compatibility in jinja2 template. rename iterkeys to keys --- roles/ceph-common/templates/ceph.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index c99f8ffb4..568eab00e 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -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 %} -- 2.39.5