cloud-init: add manage_etc_hosts to cloud init config

so that we get the hostname there
(e.g. sudo complains that it cannot resolve the hostname)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2018-03-12 16:25:05 +01:00 committed by Wolfgang Bumiller
parent 9a6ccb12ef
commit 8de34458ea

View File

@ -103,6 +103,7 @@ sub cloudinit_userdata {
my $content = "#cloud-config\n";
$content .= "hostname: $hostname\n";
$content .= "manage_etc_hosts: true\n";
$content .= "fqdn: $fqdn\n" if defined($fqdn);
my $username = $conf->{ciuser};