Skip to content

Commit

Permalink
Fix null templating issue
Browse files Browse the repository at this point in the history
It would seem that it is not possible to assign a null value
to a varible with a jinja template. Here are a few similar issues:

ansible/ansible#13877
ansible/ansible#44503
  • Loading branch information
jovial committed Oct 16, 2019
1 parent 4cca90b commit 5b5141d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/vm.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
<boot dev='network'/>
<bios useserial='yes'/>
</os>
<cpu{% if cpu_mode is not none %} mode='{{ cpu_mode }}'{% endif %}>
{% if cpu_mode %}
<cpu mode='{{ cpu_mode }}'>
<model fallback='allow'/>
</cpu>
{% endif %}
<devices>
<emulator>{{ libvirt_vm_emulator }}</emulator>
{% for volume in volumes %}
Expand Down

0 comments on commit 5b5141d

Please sign in to comment.