mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
Merge pull request #2030 from Security-Onion-Solutions/master
Merge master to dev
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
{% import_yaml 'salt/minion.defaults.yaml' as saltminion %}
|
{% import_yaml 'salt/minion.defaults.yaml' as saltminion %}
|
||||||
{% set SALTVERSION = saltminion.salt.minion.version %}
|
{% 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') %}
|
{% set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
|
||||||
|
|
||||||
{% if grains.os|lower == 'ubuntu' %}
|
{% if grains.os|lower == 'ubuntu' %}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ install_salt_minion:
|
|||||||
exec 1>&- # close stdout
|
exec 1>&- # close stdout
|
||||||
exec 2>&- # close stderr
|
exec 2>&- # close stderr
|
||||||
nohup /bin/sh -c '{{ UPGRADECOMMAND }}' &
|
nohup /bin/sh -c '{{ UPGRADECOMMAND }}' &
|
||||||
- onlyif: "[[ '{{INSTALLEDSALTVERSION}}' != '{{SALTVERSION}}' ]]"
|
- onlyif: test "{{INSTALLEDSALTVERSION}}" != "{{SALTVERSION}}"
|
||||||
|
|
||||||
salt_minion_package:
|
salt_minion_package:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
@@ -21,10 +21,10 @@ salt_minion_package:
|
|||||||
- {{ COMMON }}
|
- {{ COMMON }}
|
||||||
- salt-minion
|
- salt-minion
|
||||||
- hold: True
|
- hold: True
|
||||||
- onlyif: "[[ '{{INSTALLEDSALTVERSION}}' == '{{SALTVERSION}}' ]]"
|
- onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}"
|
||||||
|
|
||||||
salt_minion_service:
|
salt_minion_service:
|
||||||
service.running:
|
service.running:
|
||||||
- name: salt-minion
|
- name: salt-minion
|
||||||
- enable: True
|
- enable: True
|
||||||
- onlyif: "[[ '{{INSTALLEDSALTVERSION}}' == '{{SALTVERSION}}' ]]"
|
- onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}"
|
||||||
Reference in New Issue
Block a user