mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1112 from zhsj/fix-py3
fix python3 compatibility in jinja2 template.pull/1115/head
commit
c8c927faeb
|
@ -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 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 %}
|
{% set interface = hostvars[host]['monitor_interface'] if hostvars[host]['monitor_interface'] is defined else monitor_interface %}
|
||||||
{% if interface != "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 -%}
|
{% 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'] }}
|
{{ hostvars[host][key]['ipv4']['address'] }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in New Issue