From cc6f55196746a76aa883fce112a652dd8800d780 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 11 Mar 2018 11:53:46 +0100 Subject: [PATCH] Fix hostname --- modules/base_installation/manifests/system_config.pp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/base_installation/manifests/system_config.pp b/modules/base_installation/manifests/system_config.pp index ccc5dcc..c6da26b 100644 --- a/modules/base_installation/manifests/system_config.pp +++ b/modules/base_installation/manifests/system_config.pp @@ -13,20 +13,14 @@ class base_installation::system_config inherits base_installation { } file { '/etc/hostname': - content => "$base_installation::system_hostname\n", + content => "$hostname\n", } exec { "set_hostname": - command => "/usr/bin/hostnamectl set-hostname $base_installation::system_hostname", + command => "/usr/bin/hostnamectl set-hostname $hostname", refreshonly => true, subscribe => File["/etc/hostname"], returns => [0, 1], } - # TODO: find a way to ensure that /etc/hostname doesn't change - # exec { "set_hostname_firstboot": - # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", - # creates => "/etc/hostname", - # } - } -- 2.41.0