]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Fix hostname
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 11 Mar 2018 10:53:46 +0000 (11:53 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 11 Mar 2018 10:53:46 +0000 (11:53 +0100)
modules/base_installation/manifests/system_config.pp

index ccc5dcc8c9931307007adc1f2e0ad4af3c940be0..c6da26b159714f369db463bdbfb7c72c1219c509 100644 (file)
@@ -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",
-  # }
-
 }