]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Make puppet apply non-critical part at reboot
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 18 Feb 2018 21:54:05 +0000 (22:54 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 18 Feb 2018 21:54:05 +0000 (22:54 +0100)
bin/install_script.sh
modules/base_installation/manifests/cronie.pp

index d9d3808fdbb8f7f9fbf0650c553c48f76288b322..49a737fde8fe4d38ff9b61eef6858b1384558aea 100755 (executable)
@@ -173,9 +173,9 @@ cat > $ARCH_INSTALL_SCRIPT <<EOF
 CODE_PATH="/etc/puppetlabs/code"
 rm -rf \$CODE_PATH
 git clone -b $git_branch --recursive https://git.immae.eu/perso/Immae/Projets/Puppet.git \$CODE_PATH
-puppet apply --test \$CODE_PATH/manifests/site.pp
+puppet apply --tags base_installation --test \$CODE_PATH/manifests/site.pp
 # The password seed requires puppet to be run twice
-puppet apply --test \$CODE_PATH/manifests/site.pp
+puppet apply --tags base_installation --test \$CODE_PATH/manifests/site.pp
 EOF
 
 chmod a+x $ARCH_HOST_SCRIPT $ARCH_CHROOT_SCRIPT $ARCH_INSTALL_SCRIPT
@@ -197,7 +197,7 @@ read -p "Press key when LDAP is configured" i
 
 cat > $ARCH_PUPPET_CONFIGURATION_SCRIPT <<EOF
 CODE_PATH="/etc/puppetlabs/code"
-puppet apply --test \$CODE_PATH/manifests/site.pp
+puppet apply --tags base_installation --test \$CODE_PATH/manifests/site.pp
 EOF
 
 cat > $ARCH_HOST_PUPPET_CONFIGURATION_SCRIPT <<EOF
index 918bce3373af309300c3d62de427fa929a97e33b..4df0e37de3e09f764fbc4c200f957949365f89a2 100644 (file)
@@ -23,5 +23,11 @@ class base_installation::cronie inherits base_installation {
       user    => root,
       minute  => '*/20'
     }
+    cron { 'puppet-apply-reboot':
+      ensure  => present,
+      command => "cd $base_installation::puppet_code_path ; puppet apply --test $base_installation::puppet_code_path/manifests/site.pp",
+      user    => root,
+      special => "reboot"
+    }
   }
 }