mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
support for managerhype
This commit is contained in:
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
# We do not import GLOBALS in this state because it is called during setup
|
# We do not import GLOBALS in this state because it is called during setup
|
||||||
|
|
||||||
{% from 'libvirt/map.jinja' import LIBVIRTMERGED %}
|
|
||||||
{% from 'salt/map.jinja' import SYSTEMD_UNIT_FILE %}
|
|
||||||
|
|
||||||
down_original_mgmt_interface:
|
down_original_mgmt_interface:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: "nmcli con down {{ pillar.host.mainint }}"
|
- name: "nmcli con down {{ pillar.host.mainint }}"
|
||||||
@@ -32,6 +29,8 @@ wait_for_br0_ip:
|
|||||||
- onchanges:
|
- onchanges:
|
||||||
- cmd: down_original_mgmt_interface
|
- cmd: down_original_mgmt_interface
|
||||||
|
|
||||||
|
{% if grains.role == 'so-hypervisor' %}
|
||||||
|
|
||||||
update_mine_functions:
|
update_mine_functions:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /etc/salt/minion.d/mine_functions.conf
|
- name: /etc/salt/minion.d/mine_functions.conf
|
||||||
@@ -53,3 +52,5 @@ restart_salt_minion_service:
|
|||||||
- enable: True
|
- enable: True
|
||||||
- listen:
|
- listen:
|
||||||
- file: update_mine_functions
|
- file: update_mine_functions
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ enable_startup_states:
|
|||||||
- unless: pgrep so-setup
|
- unless: pgrep so-setup
|
||||||
|
|
||||||
# prior to 2.4.30 this managed file would restart the salt-minion service when updated
|
# prior to 2.4.30 this managed file would restart the salt-minion service when updated
|
||||||
# since this file is currently only adding a sleep timer on service start
|
# since this file is currently only adding a delay service start
|
||||||
# it is not required to restart the service
|
# it is not required to restart the service
|
||||||
salt_minion_service_unit_file:
|
salt_minion_service_unit_file:
|
||||||
file.managed:
|
file.managed:
|
||||||
|
|||||||
@@ -1187,15 +1187,18 @@ get_minion_type() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hypervisor_local_states() {
|
hypervisor_local_states() {
|
||||||
# these states need to run before the first highstate so that we dont deal with the salt-minion restarting
|
# these states need to run before the first highstate so that we dont deal with the salt-minion restarting
|
||||||
# and we need these setup prior to the highstate
|
# and we need these setup prior to the highstate
|
||||||
info "Check if hypervisor or managerhype"
|
info "Check if hypervisor or managerhype"
|
||||||
if [ $is_hypervisor ] || [ $is_managerhype ]; then
|
if [ $is_hypervisor ] || [ $is_managerhype ]; then
|
||||||
info "Running libvirt states for hypervisor"
|
info "Running libvirt states for hypervisor"
|
||||||
logCmd "salt-call state.apply libvirt.64962 --local --file-root=../salt/ -l info"
|
logCmd "salt-call state.apply libvirt.64962 --local --file-root=../salt/ -l info queue=True"
|
||||||
info "Setting up bridge for $MNIC"
|
info "Setting up bridge for $MNIC"
|
||||||
salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar="{\"host\": {\"mainint\": \"$MNIC\"}}"
|
salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar="{\"host\": {\"mainint\": \"$MNIC\"}} queue=True"
|
||||||
fi
|
if [ $is_managerhype ]; then
|
||||||
|
logCmd "salt-call state.apply salt.minion queue=True"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_cleanup() {
|
install_cleanup() {
|
||||||
@@ -1642,7 +1645,7 @@ reserve_ports() {
|
|||||||
reinstall_init() {
|
reinstall_init() {
|
||||||
info "Putting system in state to run setup again"
|
info "Putting system in state to run setup again"
|
||||||
|
|
||||||
if [[ $install_type =~ ^(MANAGER|EVAL|MANAGERSEARCH|STANDALONE|FLEET|IMPORT)$ ]]; then
|
if [[ $install_type =~ ^(MANAGER|EVAL|MANAGERSEARCH|MANAGERHYPE|STANDALONE|FLEET|IMPORT)$ ]]; then
|
||||||
local salt_services=( "salt-master" "salt-minion" )
|
local salt_services=( "salt-master" "salt-minion" )
|
||||||
else
|
else
|
||||||
local salt_services=( "salt-minion" )
|
local salt_services=( "salt-minion" )
|
||||||
|
|||||||
Reference in New Issue
Block a user