aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-29 20:34:04 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-29 20:35:51 +0200
commit48f15fb381adfa2e75ffda099f54088edec9f7bb (patch)
tree88be90caca8024f47e0b242e09547dbefeec76b0
parentd13887c5bf74b1d2dc4a82bd1ab38aab561f84d5 (diff)
downloadPuppet-48f15fb381adfa2e75ffda099f54088edec9f7bb.tar.gz
Puppet-48f15fb381adfa2e75ffda099f54088edec9f7bb.tar.zst
Puppet-48f15fb381adfa2e75ffda099f54088edec9f7bb.zip
Add at daemon, and ensure running service
-rw-r--r--modules/base_installation/manifests/packages.pp3
-rw-r--r--modules/base_installation/manifests/services.pp21
-rwxr-xr-xscripts/arch_install_script.sh2
-rwxr-xr-xscripts/arch_puppet_configuration_script.sh1
4 files changed, 22 insertions, 5 deletions
diff --git a/modules/base_installation/manifests/packages.pp b/modules/base_installation/manifests/packages.pp
index b0824ad..b0c976f 100644
--- a/modules/base_installation/manifests/packages.pp
+++ b/modules/base_installation/manifests/packages.pp
@@ -7,4 +7,7 @@ class base_installation::packages inherits base_installation {
7 7
8 # Puppet dependencies 8 # Puppet dependencies
9 ensure_packages(['git', 'puppet']) 9 ensure_packages(['git', 'puppet'])
10
11 # To run jobs
12 ensure_packages(['at'])
10} 13}
diff --git a/modules/base_installation/manifests/services.pp b/modules/base_installation/manifests/services.pp
index 067a8f2..57fbfc3 100644
--- a/modules/base_installation/manifests/services.pp
+++ b/modules/base_installation/manifests/services.pp
@@ -1,27 +1,38 @@
1class base_installation::services inherits base_installation { 1class base_installation::services inherits base_installation {
2 2
3 if (empty($facts["in_chroot"])) {
4 $ensure = "running"
5 } else {
6 $ensure = undef
7 }
8
3 service { "sshd": 9 service { "sshd":
4 #ensure => "running", 10 ensure => $ensure,
5 enable => true, 11 enable => true,
6 } 12 }
7 13
14 service { "atd":
15 ensure => $ensure,
16 enable => true
17 }
18
8 service { "systemd-networkd": 19 service { "systemd-networkd":
9 #ensure => "running", 20 ensure => $ensure,
10 enable => true, 21 enable => true,
11 } 22 }
12 23
13 service { "systemd-resolved": 24 service { "systemd-resolved":
14 #ensure => "running", 25 ensure => $ensure,
15 enable => true, 26 enable => true,
16 } 27 }
17 28
18 service { "systemd-timesyncd": 29 service { "systemd-timesyncd":
19 #ensure => "running", 30 ensure => $ensure,
20 enable => true 31 enable => true
21 } 32 }
22 33
23 service { "cronie": 34 service { "cronie":
24 #ensure => "running", 35 ensure => $ensure,
25 enable => true, 36 enable => true,
26 } 37 }
27 38
diff --git a/scripts/arch_install_script.sh b/scripts/arch_install_script.sh
index d2c6107..a16b796 100755
--- a/scripts/arch_install_script.sh
+++ b/scripts/arch_install_script.sh
@@ -10,6 +10,8 @@ pacman-key --init
10pacman-key --populate archlinux 10pacman-key --populate archlinux
11 11
12git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH 12git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH
13
14export FACTER_in_chroot="yes"
13puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp 15puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
14# The password seed requires puppet to be run twice 16# The password seed requires puppet to be run twice
15puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp 17puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
diff --git a/scripts/arch_puppet_configuration_script.sh b/scripts/arch_puppet_configuration_script.sh
index caf8987..4efb137 100755
--- a/scripts/arch_puppet_configuration_script.sh
+++ b/scripts/arch_puppet_configuration_script.sh
@@ -4,5 +4,6 @@ git_branch="$1"
4environment="$2" 4environment="$2"
5CODE_PATH="/etc/puppetlabs/code" 5CODE_PATH="/etc/puppetlabs/code"
6 6
7export FACTER_in_chroot="yes"
7puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp 8puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
8 9