Change the sensortab to add additional informations

This commit is contained in:
Mike Reeves
2018-11-21 09:47:27 -05:00
parent 4a8888e08d
commit 257d87684f
2 changed files with 7 additions and 1 deletions

View File

@@ -5,12 +5,18 @@
TYPE=$1
NAME=$2
IPADDRESS=$3
MANINT=$4
MONINT=$5
if grep -q $IPADDRESS "/opt/so/saltstack/pillar/data/$1.sls"; then
echo "Node Already Present"
else
echo " $NAME:" >> /opt/so/saltstack/pillar/data/$1.sls
echo " ip: $IPADDRESS" >> /opt/so/saltstack/pillar/data/$1.sls
if [ $TYPE == 'sensorstab' ]; then
echo " manint: $MANINT" >> /opt/so/saltstack/pillar/data/$1.sls
echo " monint: $MONINT" >> /opt/so/saltstack/pillar/data/$1.sls
fi
salt-call state.apply utility
fi

View File

@@ -739,7 +739,7 @@ set_initial_firewall_policy() {
if [ $INSTALLTYPE == 'SENSORONLY' ]; then
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh minions $MAINIP
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/firewall/addfirewall.sh forward_nodes $MAINIP
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh sensorstab $HOSTNAME $MAINIP
ssh -i /root/.ssh/so.key socore@$MSRV sudo /opt/so/saltstack/pillar/data/addtotab.sh sensorstab $HOSTNAME $MAINIP $MAININT bond0
fi
if [ $INSTALLTYPE == 'STORAGENODE' ]; then