diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-07-21 14:54:06 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-07-21 14:54:06 -0400 |
commit | e9f9c1e1cd47786b93491fd0f73467674c88828e (patch) | |
tree | 8fe4d23d6523be2d090e5c3a81f530be7b623cc5 /templates/hosts.suse.tmpl | |
parent | 6a4976e8a9915680fbc91f90bed8fcfa79cba5cf (diff) | |
parent | f86d0aae805aa9b3c556f09629e5be2affbc1c5e (diff) | |
download | vyos-cloud-init-e9f9c1e1cd47786b93491fd0f73467674c88828e.tar.gz vyos-cloud-init-e9f9c1e1cd47786b93491fd0f73467674c88828e.zip |
Allow the usage of jinja2 templates
This drops the hard requirement on Cheetah.
Jinja is a python 2.4->3.x compatible templating engine, allow its
optional usage (until we can depreciate cheetah) by allowing for
specifying a template file header that can define which template engine to
use.
If the template file header does not specify a renderer, then assume
that that is cheetah. If cheetah is not available, then use a limited
builtin renderer on a best effort basis, and log the warning.
LP: #1219223
Diffstat (limited to 'templates/hosts.suse.tmpl')
-rw-r--r-- | templates/hosts.suse.tmpl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/templates/hosts.suse.tmpl b/templates/hosts.suse.tmpl index 5d3d57e4..b6082692 100644 --- a/templates/hosts.suse.tmpl +++ b/templates/hosts.suse.tmpl @@ -1,9 +1,10 @@ -#* - This file /etc/cloud/templates/hosts.suse.tmpl is only utilized - if enabled in cloud-config. Specifically, in order to enable it - you need to add the following to config: - manage_etc_hosts: True -*# +## template:jinja +{# +This file /etc/cloud/templates/hosts.suse.tmpl is only utilized +if enabled in cloud-config. Specifically, in order to enable it +you need to add the following to config: + manage_etc_hosts: True +-#} # Your system has configured 'manage_etc_hosts' as True. # As a result, if you wish for changes to this file to persist # then you will need to either @@ -22,3 +23,4 @@ ff00::0 ipv6-mcastprefix ff02::1 ipv6-allnodes ff02::2 ipv6-allrouters ff02::3 ipv6-allhosts + |