change salt upgrade process

This commit is contained in:
Josh Patterson
2025-06-25 11:05:28 -04:00
parent 382c3328df
commit 38c74b46b6

View File

@@ -39,11 +39,17 @@ unhold_salt_packages:
install_salt_minion: install_salt_minion:
cmd.run: cmd.run:
- name: | - name: /bin/sh -c '{{ UPGRADECOMMAND }}'
exec 0>&- # close stdin
exec 1>&- # close stdout # minion service is in failed state after upgrade. this command will start it after the state run for the upgrade completes
exec 2>&- # close stderr start_minion:
nohup /bin/sh -c '{{ UPGRADECOMMAND }}' & cmd.run:
- name: nohup /bin/sh -c 'sleep 30; systemctl start salt-minion' &
- require:
- cmd: install_salt_minion
- watch:
- cmd: install_salt_minion
- order: last
{% endif %} {% endif %}