blob: c6da26b159714f369db463bdbfb7c72c1219c509 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
class base_installation::system_config inherits base_installation {
unless empty($base_installation::system_timezone) {
file { "/etc/localtime":
ensure => "link",
target => "../usr/share/zoneinfo/$base_installation::system_timezone"
}
}
if empty($base_installation::system_hostname) {
$hostname = $base_installation::real_hostname
} else {
$hostname = $base_installation::system_hostname
}
file { '/etc/hostname':
content => "$hostname\n",
}
exec { "set_hostname":
command => "/usr/bin/hostnamectl set-hostname $hostname",
refreshonly => true,
subscribe => File["/etc/hostname"],
returns => [0, 1],
}
}
|