bifrost/playbooks/roles/bifrost-deploy-nodes-dynamic/templates/dhcp-host.j2
stephane 10f3ba5d52 Make booleans in templates explicit
We had several places in templates where booleans weren't
handled correctly - if the boolean was defined, the template
conditional would be true regardless of its value. Fix these
conditionals so they have the correct result when variables
are defined but false.

Change-Id: I2c8e0b8ac72b5a132b0d3e1f4f0e399454397873
2016-06-01 08:33:56 -07:00

7 lines
204 B
Django/Jinja

# This file is managed by bifrost
{% if inventory_dhcp_static_ip | bool == true %}
{{ nics[0]['mac'] }},{{provisioning_ipv4_address}},{{name}},12h
{% else %}
{{ nics[0]['mac'] }},{{name}},12h
{% endif %}