mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-14 12:11:29 +01:00
36 lines
1.6 KiB
Django/Jinja
36 lines
1.6 KiB
Django/Jinja
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
|
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
|
https://securityonion.net/license; you may not use this file except in compliance with the
|
|
Elastic License 2.0. #}
|
|
|
|
{% set role = salt['grains.get']('role', '') %}
|
|
{% if role in ['so-hypervisor','so-managerhype'] and salt['network.ip_addrs']('br0')|length > 0 %}
|
|
{% set interface = 'br0' %}
|
|
{% else %}
|
|
{% set interface = pillar.host.mainint %}
|
|
{% endif %}
|
|
|
|
{% import_yaml 'salt/minion.defaults.yaml' as saltminion %}
|
|
{% set SALTVERSION = saltminion.salt.minion.version | string %}
|
|
{% set INSTALLEDSALTVERSION = grains.saltversion | string %}
|
|
|
|
{% if grains.os_family == 'Debian' %}
|
|
{% set SPLITCHAR = '+' %}
|
|
{% set SALTPACKAGES = ['salt-common', 'salt-master', 'salt-minion', 'salt-cloud'] %}
|
|
{% set SYSTEMD_UNIT_FILE = '/lib/systemd/system/salt-minion.service' %}
|
|
{% else %}
|
|
{% set SPLITCHAR = '-' %}
|
|
{% set SALTPACKAGES = ['salt', 'salt-master', 'salt-minion', 'salt-cloud'] %}
|
|
{% set SYSTEMD_UNIT_FILE = '/usr/lib/systemd/system/salt-minion.service' %}
|
|
{% endif %}
|
|
|
|
{% if INSTALLEDSALTVERSION != SALTVERSION %}
|
|
{% if grains.os_family|lower == 'redhat' %}
|
|
{% set UPGRADECOMMAND = 'yum clean all ; /usr/sbin/bootstrap-salt.sh -s 120 -r -F stable ' ~ SALTVERSION %}
|
|
{% elif grains.os_family|lower == 'debian' %}
|
|
{% set UPGRADECOMMAND = '/usr/sbin/bootstrap-salt.sh -s 120 -F stable ' ~ SALTVERSION %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% set UPGRADECOMMAND = 'echo Already running Salt Minion version ' ~ SALTVERSION %}
|
|
{% endif %}
|