Skip to content
Snippets Groups Projects
Commit 4af4ff59 authored by alxwr's avatar alxwr Committed by Niels Abspoel
Browse files

Restart (if needed) before reload (#244)

Some configuration changes only take effect after a restart of the service.
When the module 'apache-reload' is triggered too early, it fails which results
in a false-negative result of the Salt run.
In order to fix that 'apache-restart' and the service definition itself are
put before 'apache-reload'. Reload should always succeed if restart did.
parent 79673343
Branches
No related tags found
No related merge requests found
...@@ -15,6 +15,9 @@ apache: ...@@ -15,6 +15,9 @@ apache:
service.running: service.running:
- name: {{ apache.service }} - name: {{ apache.service }}
- enable: True - enable: True
- require:
- module: apache-restart
- module: apache-reload
# The following states are inert by default and can be used by other states to # The following states are inert by default and can be used by other states to
# trigger a restart or reload as needed. # trigger a restart or reload as needed.
...@@ -22,6 +25,8 @@ apache-reload: ...@@ -22,6 +25,8 @@ apache-reload:
module.wait: module.wait:
- name: service.reload - name: service.reload
- m_name: {{ apache.service }} - m_name: {{ apache.service }}
- require:
- module: apache-restart
apache-restart: apache-restart:
module.wait: module.wait:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment