diff options
author | harlowja <harlowja@virtualbox.rhel> | 2013-02-21 22:51:02 -0800 |
---|---|---|
committer | harlowja <harlowja@virtualbox.rhel> | 2013-02-21 22:51:02 -0800 |
commit | 575a084808db7d5ac607a848b018abe676e73a91 (patch) | |
tree | 34e179b0623074e6cd6fc03e4b3db001f8e493bf /cloudinit/config/cc_update_etc_hosts.py | |
parent | 9dfb60d3144860334ab1ad1d72920d962139461f (diff) | |
parent | d4886b65549c886499141872a9928412a74bbea2 (diff) | |
download | vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.tar.gz vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.zip |
Update to code on trunk.
Diffstat (limited to 'cloudinit/config/cc_update_etc_hosts.py')
-rw-r--r-- | cloudinit/config/cc_update_etc_hosts.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/config/cc_update_etc_hosts.py b/cloudinit/config/cc_update_etc_hosts.py index 4d75000f..d3dd1f32 100644 --- a/cloudinit/config/cc_update_etc_hosts.py +++ b/cloudinit/config/cc_update_etc_hosts.py @@ -37,13 +37,13 @@ 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)) - out_fn = cloud.paths.join(False, '/etc/hosts') - templater.render_to_file(tpl_fn_name, out_fn, + templater.render_to_file(tpl_fn_name, '/etc/hosts', {'hostname': hostname, 'fqdn': fqdn}) elif manage_hosts == "localhost": |