mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
upgrade and start salt process change
This commit is contained in:
@@ -38,24 +38,32 @@ unhold_salt_packages:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
install_salt_minion:
|
install_salt_minion:
|
||||||
|
cmd.run:
|
||||||
|
- name: /bin/sh -c '{{ UPGRADECOMMAND }}'
|
||||||
|
|
||||||
|
# minion service is in failed state after upgrade. this command will start it after the state run for the upgrade completes
|
||||||
|
start_minion:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: |
|
- name: |
|
||||||
exec 0>&- # close stdin
|
exec 0>&- # close stdin
|
||||||
exec 1>&- # close stdout
|
exec 1>&- # close stdout
|
||||||
exec 2>&- # close stderr
|
exec 2>&- # close stderr
|
||||||
nohup /bin/sh -c '{{ UPGRADECOMMAND }}' &
|
nohup /bin/sh -c 'sleep 30; systemctl start salt-minion' &
|
||||||
|
- require:
|
||||||
|
- cmd: install_salt_minion
|
||||||
|
- watch:
|
||||||
|
- cmd: install_salt_minion
|
||||||
|
- order: last
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if INSTALLEDSALTVERSION|string == SALTVERSION|string %}
|
{% if INSTALLEDSALTVERSION|string == SALTVERSION|string %}
|
||||||
# only hold the package if it is already installed
|
|
||||||
hold_salt_packages:
|
hold_salt_packages:
|
||||||
pkg.held:
|
pkg.held:
|
||||||
- pkgs:
|
- pkgs:
|
||||||
{% for package in SALTPACKAGES %}
|
{% for package in SALTPACKAGES %}
|
||||||
{% if salt['pkg.version'](package) %}
|
|
||||||
- {{ package }}: {{SALTVERSION}}-0.*
|
- {{ package }}: {{SALTVERSION}}-0.*
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
remove_error_log_level_logfile:
|
remove_error_log_level_logfile:
|
||||||
|
|||||||
Reference in New Issue
Block a user