Setup - add jq and fix eval calculation of failure

This commit is contained in:
Mike Reeves
2019-12-10 16:50:23 -05:00
parent 0c637b2fff
commit 72b481855f
2 changed files with 7 additions and 20 deletions

View File

@@ -38,6 +38,7 @@ sensorpkgs:
- pkgs:
- docker-ce
- wget
- jq
{% if grains['os'] != 'CentOS' %}
- python-docker
- python-m2crypto

View File

@@ -644,30 +644,16 @@ if (whiptail_you_sure) ; then
salt-call state.highstate >> $SETUPLOG 2>&1
} |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0
GOODSETUP=$(tail -10 $SETUPLOG | grep Failed | awk '{ print $2}')
if [ $OS == 'centos' ]; then
if [[ $GOODSETUP == '1' ]]; then
whiptail_setup_complete
if [[ $THEHIVE == '1' ]]; then
check_hive_init_then_reboot
else
shutdown -r now
fi
if [[ $GOODSETUP == '0' ]]; then
whiptail_setup_complete
if [[ $THEHIVE == '1' ]]; then
check_hive_init_then_reboot
else
whiptail_setup_failed
shutdown -r now
fi
else
if [[ $GOODSETUP == '0' ]]; then
whiptail_setup_complete
if [[ $THEHIVE == '1' ]]; then
check_hive_init_then_reboot
else
shutdown -r now
fi
else
whiptail_setup_failed
shutdown -r now
fi
whiptail_setup_failed
shutdown -r now
fi
fi