diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-13 22:55:23 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-13 22:55:46 +0200 |
commit | 0e02a8321f34069832ccd4266b5a82d48b82186a (patch) | |
tree | 410e55373c658f7b04692c91609d7847afb0ced6 | |
parent | b9e749215600e0f214b9af845798035d40da81ff (diff) | |
download | vyos-1x-0e02a8321f34069832ccd4266b5a82d48b82186a.tar.gz vyos-1x-0e02a8321f34069832ccd4266b5a82d48b82186a.zip |
dns: hosts: T4333: migrate to new vyos_defined Jinja2 test
-rw-r--r-- | data/templates/vyos-hostsd/hosts.tmpl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/vyos-hostsd/hosts.tmpl b/data/templates/vyos-hostsd/hosts.tmpl index 03662d562..bc75d384e 100644 --- a/data/templates/vyos-hostsd/hosts.tmpl +++ b/data/templates/vyos-hostsd/hosts.tmpl @@ -12,13 +12,13 @@ ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters -{% if hosts is defined and hosts is not none %} +{% if hosts is vyos_defined %} # From 'system static-host-mapping' and DHCP server {% for tag, taghosts in hosts.items() %} # {{ tag }} -{% for host, hostprops in taghosts.items() if hostprops.address is defined %} +{% for host, hostprops in taghosts.items() if hostprops.address is vyos_defined %} {% for addr in hostprops.address %} -{{ "%-15s" | format(addr) }} {{ host }} {{ hostprops.aliases|join(' ') if hostprops.aliases is defined }} +{{ "%-15s" | format(addr) }} {{ host }} {{ hostprops.aliases|join(' ') if hostprops.aliases is vyos_defined }} {% endfor %} {% endfor %} {% endfor %} |