mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
fix ubuntu salt-common package name
This commit is contained in:
@@ -194,7 +194,7 @@ upgrade_check_salt() {
|
||||
elif [ "$OS" == "ubuntu" ]; then
|
||||
echo "Removing apt hold for Salt."
|
||||
echo ""
|
||||
apt-mark unhold "salt"
|
||||
apt-mark unhold "salt-common"
|
||||
apt-mark unhold "salt-master"
|
||||
apt-mark unhold "salt-minion"
|
||||
echo "Updating Salt packages and restarting services."
|
||||
@@ -202,7 +202,7 @@ upgrade_check_salt() {
|
||||
sh $UPDATE_DIR/salt/salt/scripts/bootstrap-salt.sh -F -M -x python3 stable "$NEWSALTVERSION"
|
||||
echo "Applying apt hold for Salt."
|
||||
echo ""
|
||||
apt-mark hold "salt"
|
||||
apt-mark hold "salt-common"
|
||||
apt-mark hold "salt-master"
|
||||
apt-mark hold "salt-minion"
|
||||
fi
|
||||
|
||||
21
salt/salt/map.jinja
Normal file
21
salt/salt/map.jinja
Normal file
@@ -0,0 +1,21 @@
|
||||
{% import_yaml 'salt/minion.defaults.yaml' as salt %}
|
||||
{% set SALTVERSION = salt.salt.minion.version %}
|
||||
|
||||
{% set SALTPACKAGES = salt['grains.filter_by']({
|
||||
'Ubuntu': {
|
||||
'common': 'salt-common',
|
||||
},
|
||||
'Centos': {
|
||||
'common': 'salt',
|
||||
},
|
||||
}) %}
|
||||
|
||||
{% if grains.saltversion|string != SALTVERSION|string %}
|
||||
{% if grains.os|lower == 'centos' %}
|
||||
{% set UPGRADECOMMAND = 'yum versionlock delete "salt-*" && sh bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% elif grains.os|lower == 'ubuntu' %}
|
||||
{% set UPGRADECOMMAND = 'apt-mark unhold salt && apt-mark unhold salt-minion && sh bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set UPGRADECOMMAND = 'echo Already running Salt Minon version ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
@@ -1,18 +1,9 @@
|
||||
include:
|
||||
- salt
|
||||
|
||||
{% import_yaml 'salt/minion.defaults.yaml' as salt %}
|
||||
{% set SALTVERSION = salt.salt.minion.version %}
|
||||
{% from 'salt/map.jinja' import SALTPACKAGES with context %}
|
||||
{% from 'salt/map.jinja' import UPGRADECOMMAND with context %}
|
||||
|
||||
{% if grains.saltversion|string != SALTVERSION|string %}
|
||||
{% if grains.os|lower == 'centos' %}
|
||||
{% set UPGRADECOMMAND = 'yum versionlock delete "salt-*" && sh bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% elif grains.os|lower == 'ubuntu' %}
|
||||
{% set UPGRADECOMMAND = 'apt-mark unhold salt && apt-mark unhold salt-minion && sh bootstrap-salt.sh -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set UPGRADECOMMAND = 'echo Already running Salt Minon version ' ~ SALTVERSION %}
|
||||
{% endif %}
|
||||
|
||||
install_salt_minion:
|
||||
cmd.run:
|
||||
@@ -26,7 +17,7 @@ install_salt_minion:
|
||||
salt_minion_package:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- salt
|
||||
- {{ SALTPACKAGES.common }}
|
||||
- salt-minion
|
||||
- hold: True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user