summaryrefslogtreecommitdiff
path: root/templates/resolv.conf.tmpl
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-08-21 16:26:43 -0400
committerScott Moser <smoser@ubuntu.com>2014-08-21 16:26:43 -0400
commit589f740909b40d814a4b802263e61ff2b5c35b24 (patch)
tree06d176e0dc83f3a90a579d742a8c0fa68f312b16 /templates/resolv.conf.tmpl
parentd8c8a87f9b4c314bc39f5987602c02d3861f329f (diff)
downloadvyos-cloud-init-589f740909b40d814a4b802263e61ff2b5c35b24.tar.gz
vyos-cloud-init-589f740909b40d814a4b802263e61ff2b5c35b24.zip
fix rendering resolv.conf if no 'options' are provided
this makes some changes to the cc_resolv_conf to make its generate_resolv_conf method more easily callable (for future test). Also sets it up so that 'options' is always defined when the template is rendered. LP: #1328953
Diffstat (limited to 'templates/resolv.conf.tmpl')
-rw-r--r--templates/resolv.conf.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/resolv.conf.tmpl b/templates/resolv.conf.tmpl
index 6f908f30..1300156c 100644
--- a/templates/resolv.conf.tmpl
+++ b/templates/resolv.conf.tmpl
@@ -21,7 +21,7 @@ domain {{domain}}
sortlist {% for sort in sortlist %}{{sort}} {% endfor %}
{% endif %}
-{% if options is defined or flags is defined %}
+{% if options or flags %}
options {% for flag in flags %}{{flag}} {% endfor %}
{% for key, value in options.iteritems() -%}