mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-03-23 21:12:39 +01:00
113 lines
3.6 KiB
Plaintext
113 lines
3.6 KiB
Plaintext
# 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.
|
|
|
|
{% import_yaml '/opt/so/saltstack/local/pillar/global/soc_global.sls' as SOC_GLOBAL %}
|
|
{% if SOC_GLOBAL.global.airgap %}
|
|
{% set UPDATE_DIR='/tmp/soagupdate/SecurityOnion' %}
|
|
{% else %}
|
|
{% set UPDATE_DIR='/tmp/sogh/securityonion' %}
|
|
{% endif %}
|
|
{% set SOVERSION = salt['file.read']('/etc/soversion').strip() %}
|
|
|
|
# This section is used to put the scripts in place in the Salt file system
|
|
# in case a state run tries to overwrite what we do in the next section.
|
|
copy_so-common_common_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/common/tools/sbin/so-common
|
|
- source: {{UPDATE_DIR}}/salt/common/tools/sbin/so-common
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-image-common_common_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/common/tools/sbin/so-image-common
|
|
- source: {{UPDATE_DIR}}/salt/common/tools/sbin/so-image-common
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_soup_manager_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/manager/tools/sbin/soup
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/soup
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-firewall_manager_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/manager/tools/sbin/so-firewall
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-firewall
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-yaml_manager_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/manager/tools/sbin/so-yaml.py
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-yaml.py
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-repo-sync_manager_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/manager/tools/sbin/so-repo-sync
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-repo-sync
|
|
- preserve: True
|
|
|
|
copy_bootstrap-salt_manager_tools_sbin:
|
|
file.copy:
|
|
- name: /opt/so/saltstack/default/salt/salt/scripts/bootstrap-salt.sh
|
|
- source: {{UPDATE_DIR}}/salt/salt/scripts/bootstrap-salt.sh
|
|
- preserve: True
|
|
|
|
# This section is used to put the new script in place so that it can be called during soup.
|
|
# It is faster than calling the states that normally manage them to put them in place.
|
|
copy_so-common_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/so-common
|
|
- source: {{UPDATE_DIR}}/salt/common/tools/sbin/so-common
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-image-common_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/so-image-common
|
|
- source: {{UPDATE_DIR}}/salt/common/tools/sbin/so-image-common
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_soup_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/soup
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/soup
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-firewall_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/so-firewall
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-firewall
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-yaml_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/so-yaml.py
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-yaml.py
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_so-repo-sync_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/so-repo-sync
|
|
- source: {{UPDATE_DIR}}/salt/manager/tools/sbin/so-repo-sync
|
|
- force: True
|
|
- preserve: True
|
|
|
|
copy_bootstrap-salt_sbin:
|
|
file.copy:
|
|
- name: /usr/sbin/bootstrap-salt.sh
|
|
- source: {{UPDATE_DIR}}/salt/salt/scripts/bootstrap-salt.sh
|
|
- force: True
|
|
- preserve: True
|