diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-24 02:22:17 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-29 22:46:14 +0200 |
commit | 7fed35a408b9ec37454169425823785b5fc8978b (patch) | |
tree | 28371d43ac304f99fb0a5305124858db69ef2137 /modules/base_installation/manifests/system_config.pp | |
parent | ba2cf1b5d938810077b0fd73844faf432e8e8f9d (diff) | |
download | Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.gz Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.zst Puppet-7fed35a408b9ec37454169425823785b5fc8978b.zip |
Refactor base installation module
Diffstat (limited to 'modules/base_installation/manifests/system_config.pp')
-rw-r--r-- | modules/base_installation/manifests/system_config.pp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/base_installation/manifests/system_config.pp b/modules/base_installation/manifests/system_config.pp new file mode 100644 index 0000000..f3325f4 --- /dev/null +++ b/modules/base_installation/manifests/system_config.pp | |||
@@ -0,0 +1,21 @@ | |||
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 | |||
14 | # TODO: find a way to ensure that /etc/hostname doesn't change | ||
15 | # exec { "set_hostname": | ||
16 | # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", | ||
17 | # creates => "/etc/hostname", | ||
18 | # } | ||
19 | } | ||
20 | |||
21 | } | ||