This commit is contained in:
Mike Reeves
2020-07-15 17:46:33 -04:00
parent 9781d8d0e7
commit d71dc89b13
6 changed files with 169 additions and 242 deletions

View File

@@ -17,6 +17,17 @@
. /usr/sbin/so-common
local_salt_dir=/opt/so/saltstack/local
manager_check() {
# Check to see if this is a manager
MANAGERCHECK=$(cat /etc/salt/grains | grep role | awk '{print $2}')
if [ $MANAGERCHECK == 'so-eval' OR $MANAGERCHECK == 'so-manager' OR $MANAGERCHECK == 'so-managersearch' ]; then
echo "This is a manager. We can proceed."
else
echo "Please run so-features-enable on the manager."
exit 0
}
manager_check
VERSION=$(grep soversion $local_salt_dir/pillar/static.sls | cut -d':' -f2|sed 's/ //g')
# Modify static.sls to enable Features
sed -i 's/features: False/features: True/' $local_salt_dir/pillar/static.sls