Skip to content

Commit

Permalink
fix(apache.service.running): prevent recursive requisite
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Mar 21, 2024
1 parent 1553a9d commit 5338e8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
16 changes: 7 additions & 9 deletions apache/config/file.sls
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apache-config-file-directory-logdir:
- makedirs: True
- require:
- sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running
apache-config-file-directory-vhostdir:
Expand All @@ -28,7 +28,7 @@ apache-config-file-directory-vhostdir:
- makedirs: True
- require:
- sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running
apache-config-file-directory-moddir:
Expand All @@ -37,7 +37,7 @@ apache-config-file-directory-moddir:
- makedirs: True
- require:
- sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running
{%- if apache.davlockdbdir %}
Expand All @@ -53,7 +53,7 @@ apache-config-file-directory-davlockdbdir:
- group
- require:
- sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running
{%- endif %}
Expand All @@ -65,7 +65,7 @@ apache-config-file-directory-sites-enabled:
- makedirs: True
- require:
- sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running
{%- endif %}
Expand All @@ -77,7 +77,7 @@ apache-config-file-directory-conf-enabled:
- makedirs: True
- require:
- sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running
{%- endif %}
Expand Down Expand Up @@ -111,7 +111,7 @@ apache-config-file-managed-{{ grains.os }}-env:
- template: {{ apache.get('template_engine', 'jinja') }}
- context:
apache: {{ apache | json }}
- require_in:
- watch_in:
- file: apache-config-file-managed-{{ grains.os }}-ports
apache-config-file-managed-{{ grains.os }}-ports:
Expand Down Expand Up @@ -158,6 +158,4 @@ apache-config-file-managed-skip:
- sls: {{ sls_package_install }}
- watch_in:
- module: apache-service-running-restart
- require_in:
- module: apache-service-running-restart
- service: apache-service-running
12 changes: 2 additions & 10 deletions apache/service/running.sls
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ apache-service-running:
service.running:
- name: {{ apache.service.name }}
- enable: True
- watch:
- sls: {{ sls_config_file }}
- retry: {{ apache.retry_option|json }}
cmd.run:
- names:
Expand All @@ -41,10 +39,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 }}
- after:
- service: apache-service-running
apache-service-running-reload:
Expand All @@ -57,8 +52,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 }}
- after:
- service: apache-service-running

0 comments on commit 5338e8c

Please sign in to comment.