mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +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:
|
- text:
|
||||||
- "log_level: error"
|
- "log_level: error"
|
||||||
- "log_level_logfile: error"
|
- "log_level_logfile: error"
|
||||||
- listen_in:
|
|
||||||
- service: salt_minion_service
|
|
||||||
|
|
||||||
salt_minion_service_unit_file:
|
salt_minion_service_unit_file:
|
||||||
file.managed:
|
file.managed:
|
||||||
@@ -74,8 +72,6 @@ salt_minion_service_unit_file:
|
|||||||
service_start_delay: {{ service_start_delay }}
|
service_start_delay: {{ service_start_delay }}
|
||||||
- onchanges_in:
|
- onchanges_in:
|
||||||
- module: systemd_reload
|
- module: systemd_reload
|
||||||
- listen_in:
|
|
||||||
- service: salt_minion_service
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -84,8 +80,6 @@ mine_functions:
|
|||||||
- name: /etc/salt/minion.d/mine_functions.conf
|
- name: /etc/salt/minion.d/mine_functions.conf
|
||||||
- source: salt://salt/etc/minion.d/mine_functions.conf
|
- source: salt://salt/etc/minion.d/mine_functions.conf
|
||||||
- template: jinja
|
- 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
|
# this has to be outside the if statement above since there are <requisite>_in calls to this state
|
||||||
salt_minion_service:
|
salt_minion_service:
|
||||||
@@ -93,6 +87,13 @@ salt_minion_service:
|
|||||||
- name: salt-minion
|
- name: salt-minion
|
||||||
- enable: True
|
- enable: True
|
||||||
- onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}"
|
- 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:
|
patch_pkg:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
|
|||||||
Reference in New Issue
Block a user