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
changes/18/6118/1
Alexander Lutay 9 years ago
parent 41b6375324
commit 2492773e07

@ -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"
}

Loading…
Cancel
Save