diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-29 20:34:04 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-29 20:35:51 +0200 |
commit | 48f15fb381adfa2e75ffda099f54088edec9f7bb (patch) | |
tree | 88be90caca8024f47e0b242e09547dbefeec76b0 | |
parent | d13887c5bf74b1d2dc4a82bd1ab38aab561f84d5 (diff) | |
download | Puppet-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.pp | 3 | ||||
-rw-r--r-- | modules/base_installation/manifests/services.pp | 21 | ||||
-rwxr-xr-x | scripts/arch_install_script.sh | 2 | ||||
-rwxr-xr-x | scripts/arch_puppet_configuration_script.sh | 1 |
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 @@ | |||
1 | class base_installation::services inherits base_installation { | 1 | class 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 | |||
10 | pacman-key --populate archlinux | 10 | pacman-key --populate archlinux |
11 | 11 | ||
12 | git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH | 12 | git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH |
13 | |||
14 | export FACTER_in_chroot="yes" | ||
13 | puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp | 15 | puppet 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 |
15 | puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp | 17 | puppet 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" | |||
4 | environment="$2" | 4 | environment="$2" |
5 | CODE_PATH="/etc/puppetlabs/code" | 5 | CODE_PATH="/etc/puppetlabs/code" |
6 | 6 | ||
7 | export FACTER_in_chroot="yes" | ||
7 | puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp | 8 | puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp |
8 | 9 | ||