mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-10 03:02:58 +01:00
Merge pull request #15193 from Security-Onion-Solutions/salt300616
Salt 3006.16
This commit is contained in:
@@ -23,6 +23,7 @@ TOPFILE=/opt/so/saltstack/default/salt/top.sls
|
|||||||
BACKUPTOPFILE=/opt/so/saltstack/default/salt/top.sls.backup
|
BACKUPTOPFILE=/opt/so/saltstack/default/salt/top.sls.backup
|
||||||
SALTUPGRADED=false
|
SALTUPGRADED=false
|
||||||
SALT_CLOUD_INSTALLED=false
|
SALT_CLOUD_INSTALLED=false
|
||||||
|
SALT_CLOUD_CONFIGURED=false
|
||||||
# used to display messages to the user at the end of soup
|
# used to display messages to the user at the end of soup
|
||||||
declare -a FINAL_MESSAGE_QUEUE=()
|
declare -a FINAL_MESSAGE_QUEUE=()
|
||||||
|
|
||||||
@@ -1270,6 +1271,10 @@ upgrade_salt() {
|
|||||||
if rpm -q salt-cloud &>/dev/null; then
|
if rpm -q salt-cloud &>/dev/null; then
|
||||||
SALT_CLOUD_INSTALLED=true
|
SALT_CLOUD_INSTALLED=true
|
||||||
fi
|
fi
|
||||||
|
# Check if salt-cloud is configured
|
||||||
|
if [[ -f /etc/salt/cloud.profiles.d/socloud.conf ]]; then
|
||||||
|
SALT_CLOUD_CONFIGURED=true
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Removing yum versionlock for Salt."
|
echo "Removing yum versionlock for Salt."
|
||||||
echo ""
|
echo ""
|
||||||
@@ -1587,7 +1592,7 @@ main() {
|
|||||||
# ensure the mine is updated and populated before highstates run, following the salt-master restart
|
# ensure the mine is updated and populated before highstates run, following the salt-master restart
|
||||||
update_salt_mine
|
update_salt_mine
|
||||||
|
|
||||||
if [[ $SALT_CLOUD_INSTALLED == true && $SALTUPGRADED == true ]]; then
|
if [[ $SALT_CLOUD_CONFIGURED == true && $SALTUPGRADED == true ]]; then
|
||||||
echo "Updating salt-cloud config to use the new Salt version"
|
echo "Updating salt-cloud config to use the new Salt version"
|
||||||
salt-call state.apply salt.cloud.config concurrent=True
|
salt-call state.apply salt.cloud.config concurrent=True
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ cloud_profiles:
|
|||||||
SALTVERSION: {{ SALTVERSION }}
|
SALTVERSION: {{ SALTVERSION }}
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
{% else %}
|
||||||
|
no_hypervisors_configured:
|
||||||
|
test.succeed_without_changes:
|
||||||
|
- name: no_hypervisors_configured
|
||||||
|
- comment: No hypervisors are configured
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
Reference in New Issue
Block a user