diff options
-rw-r--r-- | modules/base_installation/manifests/system_config.pp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/base_installation/manifests/system_config.pp b/modules/base_installation/manifests/system_config.pp index f3325f4..25bfe0f 100644 --- a/modules/base_installation/manifests/system_config.pp +++ b/modules/base_installation/manifests/system_config.pp | |||
@@ -11,8 +11,15 @@ class base_installation::system_config inherits base_installation { | |||
11 | content => "$base_installation::system_hostname\n", | 11 | content => "$base_installation::system_hostname\n", |
12 | } | 12 | } |
13 | 13 | ||
14 | exec { "set_hostname": | ||
15 | command => "/usr/bin/hostnamectl set-hostname $base_installation::system_hostname", | ||
16 | refreshonly => true, | ||
17 | subscribe => File["/etc/hostname"], | ||
18 | returns => [0, 1], | ||
19 | } | ||
20 | |||
14 | # TODO: find a way to ensure that /etc/hostname doesn't change | 21 | # TODO: find a way to ensure that /etc/hostname doesn't change |
15 | # exec { "set_hostname": | 22 | # exec { "set_hostname_firstboot": |
16 | # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", | 23 | # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", |
17 | # creates => "/etc/hostname", | 24 | # creates => "/etc/hostname", |
18 | # } | 25 | # } |