Merge pull request #2030 from Security-Onion-Solutions/master

Merge master to dev
This commit is contained in:
Josh Patterson
2020-11-20 17:00:31 -05:00
committed by GitHub
2 changed files with 11 additions and 4 deletions

View File

@@ -1,6 +1,13 @@
{% import_yaml 'salt/minion.defaults.yaml' as saltminion %}
{% set SALTVERSION = saltminion.salt.minion.version %}
{% set INSTALLEDSALTVERSION = salt['pkg.version']('salt-minion').split('-')[0] %}
{% if grains.os == 'Ubuntu' %}
{% set SPLITCHAR = '+' %}
{% else %}
{% set SPLITCHAR = '-' %}
{% endif %}
{% set INSTALLEDSALTVERSION = salt['pkg.version']('salt-minion').split(SPLITCHAR)[0] %}
{% set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
{% if grains.os|lower == 'ubuntu' %}

View File

@@ -13,7 +13,7 @@ install_salt_minion:
exec 1>&- # close stdout
exec 2>&- # close stderr
nohup /bin/sh -c '{{ UPGRADECOMMAND }}' &
- onlyif: "[[ '{{INSTALLEDSALTVERSION}}' != '{{SALTVERSION}}' ]]"
- onlyif: test "{{INSTALLEDSALTVERSION}}" != "{{SALTVERSION}}"
salt_minion_package:
pkg.installed:
@@ -21,10 +21,10 @@ salt_minion_package:
- {{ COMMON }}
- salt-minion
- hold: True
- onlyif: "[[ '{{INSTALLEDSALTVERSION}}' == '{{SALTVERSION}}' ]]"
- onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}"
salt_minion_service:
service.running:
- name: salt-minion
- enable: True
- onlyif: "[[ '{{INSTALLEDSALTVERSION}}' == '{{SALTVERSION}}' ]]"
- onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}"