mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-28 10:53:34 +01:00
add airgap option to upgradecommand
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{% import_yaml 'salt/minion.defaults.yaml' as salt %}
|
||||
{% set SALTVERSION = salt.salt.minion.version %}
|
||||
{% set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
|
||||
|
||||
{% if grains.os|lower == 'ubuntu' %}
|
||||
{% set COMMON = 'salt-common' %}
|
||||
@@ -9,10 +10,14 @@
|
||||
|
||||
{% if grains.saltversion|string != SALTVERSION|string %}
|
||||
{% if grains.os|lower in ['centos', 'redhat'] %}
|
||||
{% set UPGRADECOMMAND = 'yum versionlock delete "salt-*" && sh /usr/sbin/bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% if ISAIRGAP is sameas true %}
|
||||
{% set UPGRADECOMMAND = 'yum clean all && yum versionlock delete "salt-*" && sh /usr/sbin/bootstrap-salt.sh -r -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% else %}
|
||||
{% set UPGRADECOMMAND = 'yum versionlock delete "salt-*" && sh /usr/sbin/bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
{% elif grains.os|lower == 'ubuntu' %}
|
||||
{% set UPGRADECOMMAND = 'apt-mark unhold salt-common && apt-mark unhold salt-minion && sh /usr/sbin/bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set UPGRADECOMMAND = 'echo Already running Salt Minon version ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user