Fix templating error with no IPv6 network present

Fixes #14
This commit is contained in:
Maciej Delmanowski 2015-07-11 00:10:12 +02:00
parent a81a9d4000
commit 49c26ff64b
2 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,9 @@ v0.1.1
- Add support for iPXE boot loader chain-loading and DHCP options. [drybjed]
- Fix a templating error when IPv6 networking is not present on a host.
[drybjed]
v0.1.0
------

View File

@ -242,7 +242,8 @@ dhcpd_subnet_default:
routers: '{{ ansible_default_ipv4.gateway | default("") }}'
comment: 'Generated automatically by Ansible'
'6':
subnet: '{{ ansible_default_ipv6.address|default("::1") + "/" + ansible_default_ipv6.prefix }}'
subnet: '{{ ((ansible_default_ipv6.address + "/" + ansible_default_ipv6.prefix)
if ansible_default_ipv6.address|d() else "") }}'
comment: 'Generated automatically by Ansible'