summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorViacheslav <v.gletenko@vyos.io>2021-10-22 11:55:17 +0000
committerChristian Poessinger <christian@poessinger.com>2022-07-05 08:38:14 +0200
commitae41b2bacfe1ed30ea8311278e4560d8cfb244ae (patch)
treea2be4ecaf94f279bf81f7371552cf388be6ddbcd /data/templates
parentf315714d0c680ad80a79dcdac21576407794dcd1 (diff)
downloadvyos-1x-ae41b2bacfe1ed30ea8311278e4560d8cfb244ae.tar.gz
vyos-1x-ae41b2bacfe1ed30ea8311278e4560d8cfb244ae.zip
hosts: T2683: Allow multiple entries for static-host-mapping
(cherry picked from commit b1db3de80b8b5f4e2dcbc6d687d342986345c4b2)
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/vyos-hostsd/hosts.tmpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/templates/vyos-hostsd/hosts.tmpl b/data/templates/vyos-hostsd/hosts.tmpl
index 8b73c6e51..03662d562 100644
--- a/data/templates/vyos-hostsd/hosts.tmpl
+++ b/data/templates/vyos-hostsd/hosts.tmpl
@@ -17,8 +17,9 @@ ff02::2 ip6-allrouters
{% for tag, taghosts in hosts.items() %}
# {{ tag }}
{% for host, hostprops in taghosts.items() if hostprops.address is defined %}
-{{ "%-15s" | format(hostprops.address) }} {{ host }} {{ hostprops.aliases|join(' ') if hostprops.aliases is defined }}
+{% for addr in hostprops.address %}
+{{ "%-15s" | format(addr) }} {{ host }} {{ hostprops.aliases|join(' ') if hostprops.aliases is defined }}
+{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
-