update service file, use salt.minion state to update mine_functions

This commit is contained in:
Josh Patterson
2025-09-24 15:19:46 -04:00
parent 4587301cca
commit 3a87af805f
2 changed files with 3 additions and 15 deletions

View File

@@ -5,11 +5,6 @@
# We do not import GLOBALS in this state because it is called during setup
include:
{# If we update the mine functions for the so-hypervisor node, then it will not be able to update the mine when the state run. #}
{# This state is called from so-functions during setup and the so-hypervisor node would not have an accepted minion key and therefore couldn't update mine #}
{% if grains.role == 'so-managerhype '%}
- salt.mine_functions
{% endif %}
- salt.minion.service_file
down_original_mgmt_interface:
@@ -37,15 +32,10 @@ wait_for_br0_ip:
- cmd: down_original_mgmt_interface
- onchanges_in:
- file: salt_minion_service_unit_file
{% if grains.role == 'so-managerhype '%}
- file: mine_functions
{% endif %}
{% if grains.role == 'so-managerhype '%}
restart_salt_minion_service:
service.running:
- name: salt-minion
- enable: True
- listen:
- file: mine_functions
{% endif %}
- file: salt_minion_service_unit_file

View File

@@ -1194,10 +1194,8 @@ hypervisor_local_states() {
info "Running libvirt states for hypervisor"
logCmd "salt-call state.apply libvirt.64962 --local --file-root=../salt/ -l info queue=True"
info "Setting up bridge for $MNIC"
salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar='{"host": {"mainint": "'$MNIC'"}}' queue=True
if [ $is_managerhype ]; then
logCmd "salt-call state.apply salt.minion queue=True"
fi
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"
fi
}