]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Add at daemon, and ensure running service
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 29 Mar 2018 18:34:04 +0000 (20:34 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 29 Mar 2018 18:35:51 +0000 (20:35 +0200)
modules/base_installation/manifests/packages.pp
modules/base_installation/manifests/services.pp
scripts/arch_install_script.sh
scripts/arch_puppet_configuration_script.sh

index b0824ad623fd613154ef775d67318ca3a86773ad..b0c976f70eef6d716509784dc6e49b5ebfa0a3c6 100644 (file)
@@ -7,4 +7,7 @@ class base_installation::packages inherits base_installation {
 
   # Puppet dependencies
   ensure_packages(['git', 'puppet'])
+
+  # To run jobs
+  ensure_packages(['at'])
 }
index 067a8f203be9030fe5160993f98c0096bb141bc7..57fbfc35b22edcc39a4d7a1e274b1b056a214a95 100644 (file)
@@ -1,27 +1,38 @@
 class base_installation::services inherits base_installation {
 
+  if (empty($facts["in_chroot"])) {
+    $ensure = "running"
+  } else {
+    $ensure = undef
+  }
+
   service { "sshd":
-    #ensure => "running",
+    ensure => $ensure,
     enable => true,
   }
 
+  service { "atd":
+    ensure => $ensure,
+    enable => true
+  }
+
   service { "systemd-networkd":
-    #ensure => "running",
+    ensure => $ensure,
     enable => true,
   }
 
   service { "systemd-resolved":
-    #ensure => "running",
+    ensure => $ensure,
     enable => true,
   }
 
   service { "systemd-timesyncd":
-    #ensure => "running",
+    ensure => $ensure,
     enable  => true
   }
 
   service { "cronie":
-    #ensure => "running",
+    ensure => $ensure,
     enable => true,
   }
 
index d2c6107123a7205a017a41a3ecc538c18d0cbe3a..a16b796a4cbd905285a3c34bf5f4e6162fa12208 100755 (executable)
@@ -10,6 +10,8 @@ pacman-key --init
 pacman-key --populate archlinux
 
 git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH
+
+export FACTER_in_chroot="yes"
 puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
 # The password seed requires puppet to be run twice
 puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp
index caf8987e50fbd7e28bd624959d12ba510565f79c..4efb1376f287f0a281b6fd1eec6f00c0e7096c3b 100755 (executable)
@@ -4,5 +4,6 @@ git_branch="$1"
 environment="$2"
 CODE_PATH="/etc/puppetlabs/code"
 
+export FACTER_in_chroot="yes"
 puppet apply --environment $environment --tags base_installation --test $CODE_PATH/manifests/site.pp