]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - modules/base_installation/manifests/system_config.pp
Disable mailto for all puppet apply
[perso/Immae/Projets/Puppet.git] / modules / base_installation / manifests / system_config.pp
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 if empty($base_installation::system_hostname) {
10 $hostname = $base_installation::real_hostname
11 } else {
12 $hostname = $base_installation::system_hostname
13 }
14
15 file { '/etc/hostname':
16 content => "$hostname\n",
17 }
18
19 exec { "set_hostname":
20 command => "/usr/bin/hostnamectl set-hostname $hostname",
21 refreshonly => true,
22 subscribe => File["/etc/hostname"],
23 returns => [0, 1],
24 }
25
26 }