diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-11 11:53:46 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-11 11:53:46 +0100 |
commit | cc6f55196746a76aa883fce112a652dd8800d780 (patch) | |
tree | d6a46f62c38388a5d77b0ee90e42bf1e6445bf2a /modules | |
parent | 5081257003019a96fcf96d55cfd6d0049a31fa43 (diff) | |
download | Puppet-cc6f55196746a76aa883fce112a652dd8800d780.tar.gz Puppet-cc6f55196746a76aa883fce112a652dd8800d780.tar.zst Puppet-cc6f55196746a76aa883fce112a652dd8800d780.zip |
Fix hostname
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base_installation/manifests/system_config.pp | 10 |
1 files 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 { | |||
13 | } | 13 | } |
14 | 14 | ||
15 | file { '/etc/hostname': | 15 | file { '/etc/hostname': |
16 | content => "$base_installation::system_hostname\n", | 16 | content => "$hostname\n", |
17 | } | 17 | } |
18 | 18 | ||
19 | exec { "set_hostname": | 19 | exec { "set_hostname": |
20 | command => "/usr/bin/hostnamectl set-hostname $base_installation::system_hostname", | 20 | command => "/usr/bin/hostnamectl set-hostname $hostname", |
21 | refreshonly => true, | 21 | refreshonly => true, |
22 | subscribe => File["/etc/hostname"], | 22 | subscribe => File["/etc/hostname"], |
23 | returns => [0, 1], | 23 | returns => [0, 1], |
24 | } | 24 | } |
25 | 25 | ||
26 | # TODO: find a way to ensure that /etc/hostname doesn't change | ||
27 | # exec { "set_hostname_firstboot": | ||
28 | # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", | ||
29 | # creates => "/etc/hostname", | ||
30 | # } | ||
31 | |||
32 | } | 26 | } |