Browse Source

fix(apache.service.running): prevent recursive requisite

pull/388/head
Alexander Weidinger 9 months ago
parent
commit
5338e8cbdb
2 changed files with 9 additions and 19 deletions
  1. +7
    -9
      apache/config/file.sls
  2. +2
    -10
      apache/service/running.sls

+ 7
- 9
apache/config/file.sls View File

- makedirs: True - makedirs: True
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running - service: apache-service-running


apache-config-file-directory-vhostdir: apache-config-file-directory-vhostdir:
- makedirs: True - makedirs: True
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running - service: apache-service-running


apache-config-file-directory-moddir: apache-config-file-directory-moddir:
- makedirs: True - makedirs: True
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running - service: apache-service-running


{%- if apache.davlockdbdir %} {%- if apache.davlockdbdir %}
- group - group
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running - service: apache-service-running


{%- endif %} {%- endif %}
- makedirs: True - makedirs: True
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running - service: apache-service-running


{%- endif %} {%- endif %}
- makedirs: True - makedirs: True
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- require_in:
- watch_in:
- service: apache-service-running - service: apache-service-running


{%- endif %} {%- endif %}
- template: {{ apache.get('template_engine', 'jinja') }} - template: {{ apache.get('template_engine', 'jinja') }}
- context: - context:
apache: {{ apache | json }} apache: {{ apache | json }}
- require_in:
- watch_in:
- file: apache-config-file-managed-{{ grains.os }}-ports - file: apache-config-file-managed-{{ grains.os }}-ports


apache-config-file-managed-{{ grains.os }}-ports: apache-config-file-managed-{{ grains.os }}-ports:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}
- watch_in: - watch_in:
- module: apache-service-running-restart - module: apache-service-running-restart
- require_in:
- module: apache-service-running-restart
- service: apache-service-running - service: apache-service-running

+ 2
- 10
apache/service/running.sls View File

service.running: service.running:
- name: {{ apache.service.name }} - name: {{ apache.service.name }}
- enable: True - enable: True
- watch:
- sls: {{ sls_config_file }}
- retry: {{ apache.retry_option|json }} - retry: {{ apache.retry_option|json }}
cmd.run: cmd.run:
- names: - names:
- cmd: {{ apache.custom_reload_command|default('apachectl graceful') }} - cmd: {{ apache.custom_reload_command|default('apachectl graceful') }}
- python_shell: True - python_shell: True
{%- endif %} {%- endif %}
- watch:
- sls: {{ sls_config_file }}
- require:
- sls: {{ sls_config_file }}
- after:
- service: apache-service-running - service: apache-service-running


apache-service-running-reload: apache-service-running-reload:
- cmd: {{ apache.custom_reload_command|default('apachectl graceful') }} - cmd: {{ apache.custom_reload_command|default('apachectl graceful') }}
- python_shell: True - python_shell: True
{%- endif %} {%- endif %}
- watch:
- sls: {{ sls_config_file }}
- require:
- sls: {{ sls_config_file }}
- after:
- service: apache-service-running - service: apache-service-running

Loading…
Cancel
Save