handle airgap

This commit is contained in:
m0duspwnens
2024-02-14 14:22:18 -05:00
parent 7d5932ee5e
commit c1f467a068
2 changed files with 7 additions and 3 deletions

View File

@@ -6,8 +6,12 @@ remove_common_so-firewall:
file.absent: file.absent:
- name: /opt/so/saltstack/default/salt/common/tools/sbin/so-firewall - name: /opt/so/saltstack/default/salt/common/tools/sbin/so-firewall
{# this pillar isn't defined anywhere. it is passed in from soup when the state is called #} {% import_yaml '/opt/so/saltstack/local/pillar/global/soc_global.sls' as SOC_GLOBAL %}
{% set UPDATE_DIR= salt['pillar.get']('UPDATE_DIR') %} {% if SOC_GLOBAL.global.airgap %}
{% set UPDATE_DIR='/tmp/soagupdate/SecurityOnion' %}
{% else %}
{% set UPDATE_DIR='/tmp/sogh/securityonion' %}
{% endif %}
copy_so-common_common_tools_sbin: copy_so-common_common_tools_sbin:
file.copy: file.copy:

View File

@@ -803,7 +803,7 @@ verify_latest_update_script() {
echo "Succesfully updated soup scripts." echo "Succesfully updated soup scripts."
else else
echo "There was a problem updating soup scripts. Trying to rerun script update." echo "There was a problem updating soup scripts. Trying to rerun script update."
salt-call state.apply common.soup_scripts queue=True -linfo --file-root=$UPDATE_DIR/salt --local pillar="{'UPDATE_DIR': $UPDATE_DIR}" salt-call state.apply common.soup_scripts queue=True -linfo --file-root=$UPDATE_DIR/salt --local
fi fi
echo "" echo ""