mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
listen instead to not start service if not running then restart if changes to files
This commit is contained in:
@@ -62,8 +62,6 @@ set_log_levels:
|
||||
- text:
|
||||
- "log_level: error"
|
||||
- "log_level_logfile: error"
|
||||
- listen_in:
|
||||
- service: salt_minion_service
|
||||
|
||||
salt_minion_service_unit_file:
|
||||
file.managed:
|
||||
@@ -74,8 +72,6 @@ salt_minion_service_unit_file:
|
||||
service_start_delay: {{ service_start_delay }}
|
||||
- onchanges_in:
|
||||
- module: systemd_reload
|
||||
- listen_in:
|
||||
- service: salt_minion_service
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -84,8 +80,6 @@ mine_functions:
|
||||
- name: /etc/salt/minion.d/mine_functions.conf
|
||||
- source: salt://salt/etc/minion.d/mine_functions.conf
|
||||
- template: jinja
|
||||
- listen_in:
|
||||
- service: salt_minion_service
|
||||
|
||||
# this has to be outside the if statement above since there are <requisite>_in calls to this state
|
||||
salt_minion_service:
|
||||
@@ -93,6 +87,13 @@ salt_minion_service:
|
||||
- name: salt-minion
|
||||
- enable: True
|
||||
- onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}"
|
||||
- listen:
|
||||
- file: mine_functions
|
||||
{% if INSTALLEDSALTVERSION|string == SALTVERSION|string %}
|
||||
- file: set_log_levels
|
||||
- file: salt_minion_service_unit_file
|
||||
{% endif %}
|
||||
|
||||
|
||||
patch_pkg:
|
||||
pkg.installed:
|
||||
|
||||
Reference in New Issue
Block a user