Disable config.file hooks in service.running

Follow-up to 14aa73e1ab, do not indirectly
include config file management with requirements.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-04-29 23:14:30 +02:00
parent 9f2bcb52b7
commit b22a6cf1bb
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -2,20 +2,14 @@
# vim: ft=sls
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_config_file = tplroot ~ '.config.file' %}
{%- from tplroot ~ "/map.jinja" import apache with context %}
include:
- {{ sls_config_file }}
apache-service-running:
{%- if salt['pillar.get']('apache:manage_service_states', True) %}
{# By default run apache service states (unless pillar is false) #}
service.running:
- name: {{ apache.service.name }}
- enable: True
- watch:
- sls: {{ sls_config_file }}
- retry: {{ apache.retry_option|json }}
cmd.run:
- names:
@ -39,10 +33,7 @@ apache-service-running-restart:
- cmd: {{ apache.custom_reload_command|default('apachectl graceful') }}
- python_shell: True
{%- endif %}
- watch:
- sls: {{ sls_config_file }}
- require:
- sls: {{ sls_config_file }}
- service: apache-service-running
apache-service-running-reload:
@ -55,8 +46,5 @@ apache-service-running-reload:
- cmd: {{ apache.custom_reload_command|default('apachectl graceful') }}
- python_shell: True
{%- endif %}
- watch:
- sls: {{ sls_config_file }}
- require:
- sls: {{ sls_config_file }}
- service: apache-service-running