mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #15066 from Security-Onion-Solutions/vlb2
set interface for network.ip_addrs for hypervisors
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
# 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
|
||||||
include:
|
include:
|
||||||
- salt.minion.service_file
|
- salt.minion.service_file
|
||||||
|
- salt.mine_functions
|
||||||
|
|
||||||
down_original_mgmt_interface:
|
down_original_mgmt_interface:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
@@ -32,6 +33,7 @@ wait_for_br0_ip:
|
|||||||
- cmd: down_original_mgmt_interface
|
- cmd: down_original_mgmt_interface
|
||||||
- onchanges_in:
|
- onchanges_in:
|
||||||
- file: salt_minion_service_unit_file
|
- file: salt_minion_service_unit_file
|
||||||
|
- file: mine_functions
|
||||||
|
|
||||||
restart_salt_minion_service:
|
restart_salt_minion_service:
|
||||||
service.running:
|
service.running:
|
||||||
@@ -39,3 +41,4 @@ restart_salt_minion_service:
|
|||||||
- enable: True
|
- enable: True
|
||||||
- listen:
|
- listen:
|
||||||
- file: salt_minion_service_unit_file
|
- file: salt_minion_service_unit_file
|
||||||
|
- file: mine_functions
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Elastic License 2.0. #}
|
Elastic License 2.0. #}
|
||||||
|
|
||||||
{% set role = salt['grains.get']('role', '') %}
|
{% set role = salt['grains.get']('role', '') %}
|
||||||
{% if role in ['so-hypervisor','so-managerhype'] and salt['network.ip_addrs']('br0')|length > 0 %}
|
{% if role in ['so-hypervisor','so-managerhype'] %}
|
||||||
{% set interface = 'br0' %}
|
{% set interface = 'br0' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set interface = pillar.host.mainint %}
|
{% set interface = pillar.host.mainint %}
|
||||||
|
|||||||
@@ -1195,7 +1195,9 @@ hypervisor_local_states() {
|
|||||||
logCmd "salt-call state.apply libvirt.64962 --local --file-root=../salt/ -l info queue=True"
|
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'"}}' queue=True
|
salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar='{"host": {"mainint": "'$MNIC'"}}' queue=True
|
||||||
logCmd "salt-call state.apply salt.minion queue=True"
|
if [ $is_managerhype ]; then
|
||||||
|
logCmd "salt-call state.apply salt.minion queue=True"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user