mirror of
https://github.com/saltstack-formulas/apache-formula.git
synced 2025-04-17 10:10:26 +00:00
Allow Skipping of service manipulation via pillar (+PR comments)
This commit is contained in:
parent
7d46830814
commit
853ec8e118
2 changed files with 19 additions and 0 deletions
|
@ -10,6 +10,8 @@ apache:
|
|||
- name: {{ apache.user }}
|
||||
- gid: {{ apache.group }}
|
||||
- system: True
|
||||
{# By default run apache service states (unless pillar is false) #}
|
||||
{% if salt['pillar.get']('apache:manage_service_states', True) %}
|
||||
service.running:
|
||||
- name: {{ apache.service }}
|
||||
- enable: True
|
||||
|
@ -25,3 +27,17 @@ apache-restart:
|
|||
module.wait:
|
||||
- name: service.restart
|
||||
- m_name: {{ apache.service }}
|
||||
|
||||
{% else %}
|
||||
|
||||
apache-reload:
|
||||
test.show_notification:
|
||||
- name: Skipping reload per user request
|
||||
- text: Pillar manage_service_states is False
|
||||
|
||||
apache-restart:
|
||||
test.show_notification:
|
||||
- name: Skipping restart per user request
|
||||
- text: Pillar manage_service_states is False
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# ``apache`` formula configuration:
|
||||
apache:
|
||||
|
||||
# By default apache restart/reload states run (false skips)
|
||||
manage_service_states: True
|
||||
|
||||
# lookup section overrides ``map.jinja`` values
|
||||
lookup:
|
||||
server: apache2
|
||||
|
|
Loading…
Add table
Reference in a new issue