diff options
author | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-02-19 16:30:06 +0100 |
---|---|---|
committer | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-02-19 16:30:06 +0100 |
commit | 6b0652745129808dc0669354cb3e0dc53962d6ea (patch) | |
tree | 6ec307c7c245cf68d28ef05e3f1a9f7d075ff8bc /cloudinit/config/cc_update_etc_hosts.py | |
parent | e18f0f8a382729cc7c9f8df3ad0573af7eeb8f47 (diff) | |
parent | 174bc39e6b2c1cac3f73f67f25fad87cab16fa42 (diff) | |
download | vyos-cloud-init-6b0652745129808dc0669354cb3e0dc53962d6ea.tar.gz vyos-cloud-init-6b0652745129808dc0669354cb3e0dc53962d6ea.zip |
Merged trunk lp:cloud-init
Diffstat (limited to 'cloudinit/config/cc_update_etc_hosts.py')
-rw-r--r-- | cloudinit/config/cc_update_etc_hosts.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/config/cc_update_etc_hosts.py b/cloudinit/config/cc_update_etc_hosts.py index 96103615..d3dd1f32 100644 --- a/cloudinit/config/cc_update_etc_hosts.py +++ b/cloudinit/config/cc_update_etc_hosts.py @@ -37,10 +37,11 @@ def handle(name, cfg, cloud, log, _args): # Render from a template file tpl_fn_name = cloud.get_template_filename("hosts.%s" % - (cloud.distro.name)) + (cloud.distro.osfamily)) if not tpl_fn_name: raise RuntimeError(("No hosts template could be" - " found for distro %s") % (cloud.distro.name)) + " found for distro %s") % + (cloud.distro.osfamily)) templater.render_to_file(tpl_fn_name, '/etc/hosts', {'hostname': hostname, 'fqdn': fqdn}) |