Detect automation with Cfengine 3

This commit is contained in:
Alexander Lobodzinski 2015-09-08 14:19:11 +02:00
parent f7ec431a65
commit 2d72fe18d3
1 changed files with 20 additions and 0 deletions

View File

@ -20,6 +20,8 @@
PUPPET_MASTER_RUNNING=0
SALT_MASTER_RUNNING=0
SALT_MINION_RUNNING=0
CF3_MASTER_RUNNING=0
CF3_MINION_RUNNING=0
#
#################################################################################
#
@ -44,6 +46,24 @@
AUTOMATION_TOOL_FOUND=1
Display --indent 4 --text "Found: Cfengine (cfagent)" --result FOUND --color GREEN
fi
# Cfengine 3
CF3_LOCATIONS="/var/cfengine/bin"
for I in ${CF3_LOCATIONS}; do
if [ -d ${I} ]; then
if [ -e ${I}/cf-agent ]; then
logtext "Result: found Cfengine3 agent (cf-agent) in ${I}"
AUTOMATION_TOOL_FOUND=1
Display --indent 4 --text "Found: Cfengine (agent)" --result FOUND --color GREEN
fi
IsRunning "cf-server"
if [ ${RUNNING} -eq 1 ]; then
logtext "Result: found cfengine server"
CF3_MASTER_RUNNING=1
report "automation_tool_running[]=cf-server"
Display --indent 4 --text "Found: Cfengine (server)" --result FOUND --color GREEN
fi
fi
done
CHEF_LOCATIONS="/opt/chef/bin /opt/chef-server/sv /opt/chefdk/bin"
for I in ${CHEF_LOCATIONS}; do