]>
Commit | Line | Data |
---|---|---|
7fed35a4 IB |
1 | class base_installation::system_config inherits base_installation { |
2 | unless empty($base_installation::system_timezone) { | |
3 | file { "/etc/localtime": | |
4 | ensure => "link", | |
5 | target => "../usr/share/zoneinfo/$base_installation::system_timezone" | |
6 | } | |
7 | } | |
8 | ||
9 | unless empty($base_installation::system_hostname) { | |
10 | file { '/etc/hostname': | |
11 | content => "$base_installation::system_hostname\n", | |
12 | } | |
13 | ||
f17c2d0b IB |
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 | ||
7fed35a4 | 21 | # TODO: find a way to ensure that /etc/hostname doesn't change |
f17c2d0b | 22 | # exec { "set_hostname_firstboot": |
7fed35a4 IB |
23 | # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", |
24 | # creates => "/etc/hostname", | |
25 | # } | |
26 | } | |
27 | ||
28 | } |