From 2492773e07a9b3c46a0814607514ca012e55f68f Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Wed, 11 May 2016 16:29:28 +0200 Subject: [PATCH] MT#17213 Discontinue puppetinithiera GRML boot option He have spent 2 hours trying to figure out why puppet1.mgm installation has failed. And it was human mistake with forgotten boot option. In the same time we must provide puppetrescuedrive boot option and we should execute Hiera initialisation in case if puppetrescuedrive is provided. So, lets reuse puppetrescuedrive for both cases. Change-Id: I31cd80522fbce720be67090398322b3426701ec9 --- deployment.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/deployment.sh b/deployment.sh index 393c120..7a7e82d 100755 --- a/deployment.sh +++ b/deployment.sh @@ -50,7 +50,6 @@ PUPPET_SERVER=puppet.mgm.sipwise.com PUPPET_GIT_REPO='' PUPPET_GIT_BRANCH=master PUPPET_LOCAL_GIT="${TARGET}/tmp/puppet.git" -PUPPET_INIT_HIERA=false PUPPET_RESCUE_DRIVE="none" PUPPET_RESCUE_PATH="/mnt/rescue_drive" PUPPET_RESCUE_LABEL="SIPWRESCUE*" @@ -460,10 +459,6 @@ if checkBootParam "puppetrescuedrive" ; then PUPPET_RESCUE_DRIVE=$(getBootParam puppetrescuedrive) fi -if checkBootParam "puppetinithiera" ; then - PUPPET_INIT_HIERA=true -fi - if checkBootParam "debianrelease" ; then DEBIAN_RELEASE=$(getBootParam debianrelease) fi @@ -2201,17 +2196,19 @@ puppet_install_from_git () { ;; esac - if "${PUPPET_INIT_HIERA}" ; then + if [ "${PUPPET_RESCUE_DRIVE}" != "none" ] ; then echo "Initializing Hiera config..." grml-chroot $TARGET puppet apply --test --modulepath="${PUPPET_CODE_PATH}/modules" \ -e "include puppet::hiera" 2>&1 | tee -a /tmp/puppet.log check_puppet_rc "${PIPESTATUS[0]}" "2" fi + echo "Running Puppet core deployment..." grml-chroot $TARGET puppet apply --test --modulepath="${PUPPET_CODE_PATH}/modules" --tags core,apt \ "${PUPPET_CODE_PATH}/manifests/site.pp" 2>&1 | tee -a /tmp/puppet.log check_puppet_rc "${PIPESTATUS[0]}" "2" + echo "Running Puppet deployment..." grml-chroot $TARGET puppet apply --test --modulepath="${PUPPET_CODE_PATH}/modules" \ "${PUPPET_CODE_PATH}/manifests/site.pp" 2>&1 | tee -a /tmp/puppet.log check_puppet_rc "${PIPESTATUS[0]}" "2" @@ -2220,9 +2217,11 @@ puppet_install_from_git () { } puppet_install_from_puppet () { + echo "Running Puppet core deployment..." grml-chroot $TARGET puppet agent --test --tags core,apt 2>&1 | tee -a /tmp/puppet.log check_puppet_rc "${PIPESTATUS[0]}" "2" + echo "Running Puppet deployment..." grml-chroot $TARGET puppet agent --test 2>&1 | tee -a /tmp/puppet.log check_puppet_rc "${PIPESTATUS[0]}" "2" }