Clean up static.sls passwords

This commit is contained in:
Mike Reeves
2020-07-22 15:50:56 -04:00
parent 46e7d29f12
commit b9e6ddf7df
2 changed files with 15 additions and 0 deletions

View File

@@ -9,6 +9,12 @@
default_salt_dir=/opt/so/saltstack/default
cortex_clean(){
sed -i '/^ cortexuser:/d' /opt/so/saltstack/local/pillar/static.sls
sed -i '/^ cortexpassword:/d' /opt/so/saltstack/local/pillar/static.sls
sed -i '/^ cortexorguser:/d' /opt/so/saltstack/local/pillar/static.sls
}
cortex_init(){
sleep 60
CORTEX_IP="{{MANAGERIP}}"
@@ -51,6 +57,7 @@ cortex_init(){
}
if [ -f /opt/so/state/cortex.txt ]; then
cortex_clean
exit 0
else
rm -f garbage_file
@@ -63,4 +70,5 @@ else
rm -f garbage_file
sleep 5
cortex_init
cortex_clean
fi