Add additional check for Puppet tool

This commit is contained in:
Michael Boelen 2017-03-27 12:21:42 +02:00
parent 8d5243c928
commit b306ab891f
1 changed files with 11 additions and 1 deletions

View File

@ -101,15 +101,25 @@
done done
# Puppet # Puppet
if [ ! "${PUPPETBINARY}" = "" ]; then
# Check for Puppet installation provided by Puppetlabs package
if [ -z "${PUPPETBINARY}" ]; then
if [ -f ${ROOTDIR}opt/puppetlabs/puppet/bin/puppet ]; then
PUPPETBINARY="${ROOTDIR}opt/puppetlabs/puppet/bin/puppet"
fi
fi
if [ ! -z "${PUPPETBINARY}" ]; then
LogText "Result: Puppet is installed (${PUPPETBINARY})" LogText "Result: Puppet is installed (${PUPPETBINARY})"
AUTOMATION_TOOL_FOUND=1 AUTOMATION_TOOL_FOUND=1
Report "automation_tool_running[]=puppet-agent" Report "automation_tool_running[]=puppet-agent"
Display --indent 4 --text "Found: Puppet (agent)" --result "${STATUS_FOUND}" --color GREEN Display --indent 4 --text "Found: Puppet (agent)" --result "${STATUS_FOUND}" --color GREEN
fi fi
IsRunning "puppet master" IsRunning "puppet master"
if [ ${RUNNING} -eq 1 ]; then if [ ${RUNNING} -eq 1 ]; then
LogText "Result: found puppet master" LogText "Result: found puppet master"
AUTOMATION_TOOL_FOUND=1
PUPPET_MASTER_RUNNING=1 PUPPET_MASTER_RUNNING=1
Report "automation_tool_running[]=puppet-master" Report "automation_tool_running[]=puppet-master"
Display --indent 4 --text "Found: Puppet (master)" --result "${STATUS_FOUND}" --color GREEN Display --indent 4 --text "Found: Puppet (master)" --result "${STATUS_FOUND}" --color GREEN