aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/templates/dhcpd.conf.j2
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2019-04-01 12:34:26 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2019-04-01 13:07:23 +0200
commitaf333f0ec23a9784756a8b0e53a9896d7f61525f (patch)
tree41614be62a37439df8ed101a8d8e14af72a09ee6 /roles/space_server/templates/dhcpd.conf.j2
parent88756850d1a5cb28b897bdcc9337fcb6977aad0b (diff)
downloadlabitat-ansible-af333f0ec23a9784756a8b0e53a9896d7f61525f.tar.gz
labitat-ansible-af333f0ec23a9784756a8b0e53a9896d7f61525f.tar.xz
labitat-ansible-af333f0ec23a9784756a8b0e53a9896d7f61525f.zip
space_server: vars: rework local_hosts
..to get rid of the need for ipv4/ipv6 filters and python-netaddr dependency.
Diffstat (limited to 'roles/space_server/templates/dhcpd.conf.j2')
-rw-r--r--roles/space_server/templates/dhcpd.conf.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/space_server/templates/dhcpd.conf.j2 b/roles/space_server/templates/dhcpd.conf.j2
index e071a88..23e08da 100644
--- a/roles/space_server/templates/dhcpd.conf.j2
+++ b/roles/space_server/templates/dhcpd.conf.j2
@@ -105,14 +105,14 @@ subnet 10.42.3.0 netmask 255.255.255.0 {
group {
use-host-decl-names on;
{% for host in local_hosts %}
+{% if 'mac' in host and 'ipv4' in host %}
-{% if 'mac' in host %}
{% if 'description' in host %}
# {{ host.description }}
{% endif %}
host {{ host.name }} {
hardware ethernet {{ host.mac }};
- fixed-address {{ host.ips | first }};
+ fixed-address {{ host.ipv4|join(', ') }};
{% if 'filename' in host %}
filename "{{ host.filename }}";
{% endif %}