setup bridge and fix salt before first highstate for hypervisors

This commit is contained in:
Josh Patterson
2025-05-16 14:24:07 -04:00
parent 9e0f13cce5
commit 6988f03ebc
4 changed files with 61 additions and 45 deletions

View File

@@ -1186,6 +1186,15 @@ get_minion_type() {
echo "$minion_type"
}
hypervisor_local_states() {
# 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
if [ $is_hypervisor ] || [ $is_managerhype ]; then
salt-call state.apply libvirt.64962 --local --file-root=../salt/ -l info
salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar='{"host": {"mainint": "enp1s0"}}'
fi
}
install_cleanup() {
if [ -f "$temp_install_dir" ]; then
info "Installer removing the following files:"

View File

@@ -822,6 +822,7 @@ if ! [[ -f $install_opt_file ]]; then
checkin_at_boot
set_initial_firewall_access
logCmd "salt-call schedule.enable -linfo --local"
hypervisor_local_states
verify_setup
else
touch /root/accept_changes
@@ -847,6 +848,7 @@ if ! [[ -f $install_opt_file ]]; then
configure_minion "$minion_type"
check_sos_appliance
drop_install_options
hypervisor_local_states
verify_setup
fi