aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/manifests/system_config.pp
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-04 21:20:20 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-04 21:20:20 +0100
commit89c7d1dea4af6026af00624af77bb1a08c8ebd53 (patch)
tree6c3b46adcdadcd75aada126cacf0a36202f31e3e /modules/base_installation/manifests/system_config.pp
parenta77b768abb31be9e19563e130d763f163496477d (diff)
parentc17e63ed33a5260ea5bf0f869d7dce39676526cb (diff)
downloadPuppet-89c7d1dea4af6026af00624af77bb1a08c8ebd53.tar.gz
Puppet-89c7d1dea4af6026af00624af77bb1a08c8ebd53.tar.zst
Puppet-89c7d1dea4af6026af00624af77bb1a08c8ebd53.zip
Merge branch 'new_node'
Diffstat (limited to 'modules/base_installation/manifests/system_config.pp')
-rw-r--r--modules/base_installation/manifests/system_config.pp34
1 files changed, 19 insertions, 15 deletions
diff --git a/modules/base_installation/manifests/system_config.pp b/modules/base_installation/manifests/system_config.pp
index 25bfe0f..ccc5dcc 100644
--- a/modules/base_installation/manifests/system_config.pp
+++ b/modules/base_installation/manifests/system_config.pp
@@ -6,23 +6,27 @@ class base_installation::system_config inherits base_installation {
6 } 6 }
7 } 7 }
8 8
9 unless empty($base_installation::system_hostname) { 9 if empty($base_installation::system_hostname) {
10 file { '/etc/hostname': 10 $hostname = $base_installation::real_hostname
11 content => "$base_installation::system_hostname\n", 11 } else {
12 } 12 $hostname = $base_installation::system_hostname
13 }
13 14
14 exec { "set_hostname": 15 file { '/etc/hostname':
15 command => "/usr/bin/hostnamectl set-hostname $base_installation::system_hostname", 16 content => "$base_installation::system_hostname\n",
16 refreshonly => true, 17 }
17 subscribe => File["/etc/hostname"],
18 returns => [0, 1],
19 }
20 18
21 # TODO: find a way to ensure that /etc/hostname doesn't change 19 exec { "set_hostname":
22 # exec { "set_hostname_firstboot": 20 command => "/usr/bin/hostnamectl set-hostname $base_installation::system_hostname",
23 # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname", 21 refreshonly => true,
24 # creates => "/etc/hostname", 22 subscribe => File["/etc/hostname"],
25 # } 23 returns => [0, 1],
26 } 24 }
27 25
26 # TODO: find a way to ensure that /etc/hostname doesn't change
27 # exec { "set_hostname_firstboot":
28 # command => "/usr/bin/systemd-firstboot --hostname=$base_installation::system_hostname",
29 # creates => "/etc/hostname",
30 # }
31
28} 32}