Compare commits
1 Commits
libertacas
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
55da6de7b1 |
@ -49,7 +49,7 @@ GIT
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (7.0.3.1)
|
activesupport (7.0.4.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
@ -402,7 +402,7 @@ GEM
|
|||||||
memoist (0.16.2)
|
memoist (0.16.2)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
minitest (5.16.2)
|
minitest (5.17.0)
|
||||||
mixlib-config (3.0.27)
|
mixlib-config (3.0.27)
|
||||||
tomlrb
|
tomlrb
|
||||||
mixlib-install (3.12.19)
|
mixlib-install (3.12.19)
|
||||||
@ -636,7 +636,7 @@ GEM
|
|||||||
pastel (~> 0.8)
|
pastel (~> 0.8)
|
||||||
strings (~> 0.2.0)
|
strings (~> 0.2.0)
|
||||||
tty-screen (~> 0.8)
|
tty-screen (~> 0.8)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
uber (0.1.0)
|
uber (0.1.0)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
|
@ -2,4 +2,14 @@
|
|||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
- .file
|
||||||
|
# .modules.clean # disable (exclude from init state)
|
||||||
|
# .modules # enable by default (read pillars)
|
||||||
|
# .debian_full
|
||||||
|
- .flags
|
||||||
|
- .logrotate
|
||||||
|
- .manage_security
|
||||||
|
- .no_default_vhost
|
||||||
|
# .own_default_vhost
|
||||||
|
- .register_site
|
||||||
- .vhosts
|
- .vhosts
|
||||||
|
@ -30,6 +30,10 @@ apache-config-vhosts-standard-{{ id }}:
|
|||||||
- require:
|
- require:
|
||||||
- pkg: apache-package-install-pkg-installed
|
- pkg: apache-package-install-pkg-installed
|
||||||
- watch_in:
|
- watch_in:
|
||||||
|
- module: apache-service-running-reload
|
||||||
|
- require_in:
|
||||||
|
- module: apache-service-running-restart
|
||||||
|
- module: apache-service-running-reload
|
||||||
- service: apache-service-running
|
- service: apache-service-running
|
||||||
|
|
||||||
{%- if site.get('DocumentRoot') != False %}
|
{%- if site.get('DocumentRoot') != False %}
|
||||||
@ -53,6 +57,10 @@ apache-config-vhosts-standard-{{ id }}-cmd-run-a2en:
|
|||||||
- require:
|
- require:
|
||||||
- file: apache-config-vhosts-standard-{{ id }}
|
- file: apache-config-vhosts-standard-{{ id }}
|
||||||
- watch_in:
|
- watch_in:
|
||||||
|
- module: apache-service-running-reload
|
||||||
|
- require_in:
|
||||||
|
- module: apache-service-running-restart
|
||||||
|
- module: apache-service-running-reload
|
||||||
- service: apache-service-running
|
- service: apache-service-running
|
||||||
|
|
||||||
{%- else %}
|
{%- else %}
|
||||||
@ -64,6 +72,10 @@ apache-config-vhosts-standard-{{ id }}-cmd-run-a2dis:
|
|||||||
- require:
|
- require:
|
||||||
- file: apache-config-vhosts-standard-{{ id }}
|
- file: apache-config-vhosts-standard-{{ id }}
|
||||||
- watch_in:
|
- watch_in:
|
||||||
|
- module: apache-service-running-reload
|
||||||
|
- require_in:
|
||||||
|
- module: apache-service-running-restart
|
||||||
|
- module: apache-service-running-reload
|
||||||
- service: apache-service-running
|
- service: apache-service-running
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
{%- set tplroot = tpldir.split('/')[0] %}
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
{%- from tplroot ~ "/map.jinja" import apache with context %}
|
{%- from tplroot ~ "/map.jinja" import apache with context %}
|
||||||
|
|
||||||
{#- consider moving this to an optional state or enabling it with a pillar option
|
|
||||||
{%- if 'deps' in apache.pkg and apache.pkg.deps and apache.pkg.deps is iterable and apache.pkg.deps is not string %}
|
{%- if 'deps' in apache.pkg and apache.pkg.deps and apache.pkg.deps is iterable and apache.pkg.deps is not string %}
|
||||||
apache-package-install-deps-pkg-installed:
|
apache-package-install-deps-pkg-installed:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
@ -12,7 +11,6 @@ apache-package-install-deps-pkg-installed:
|
|||||||
- require:
|
- require:
|
||||||
- apache-package-install-pkg-installed
|
- apache-package-install-pkg-installed
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
#}
|
|
||||||
|
|
||||||
apache-package-install-pkg-installed:
|
apache-package-install-pkg-installed:
|
||||||
{%- if grains.os_family == 'Windows' %}
|
{%- if grains.os_family == 'Windows' %}
|
||||||
|
@ -2,10 +2,63 @@
|
|||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
{%- set tplroot = tpldir.split('/')[0] %}
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
|
{%- set sls_config_file = tplroot ~ '.config.file' %}
|
||||||
|
{%- set sls_config_registersite = tplroot ~ '.config.register_site' %}
|
||||||
{%- from tplroot ~ "/map.jinja" import apache with context %}
|
{%- from tplroot ~ "/map.jinja" import apache with context %}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- {{ sls_config_file }}
|
||||||
|
- {{ sls_config_registersite }}
|
||||||
|
|
||||||
apache-service-running:
|
apache-service-running:
|
||||||
|
{%- if salt['pillar.get']('apache:manage_service_states', True) %}
|
||||||
|
{# By default run apache service states (unless pillar is false) #}
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ apache.service.name }}
|
- name: {{ apache.service.name }}
|
||||||
- enable: True
|
- enable: True
|
||||||
- reload: True
|
- watch:
|
||||||
|
- sls: {{ sls_config_file }}
|
||||||
|
- retry: {{ apache.retry_option|json }}
|
||||||
|
cmd.run:
|
||||||
|
- names:
|
||||||
|
- journalctl -xe -u {{ apache.service.name }} || tail -20 /var/log/messages || true
|
||||||
|
- (service {{ apache.service.name }} restart && service {{ apache.service.name }} status) || true
|
||||||
|
- cat {{ apache.config }}
|
||||||
|
- onfail:
|
||||||
|
- service: apache-service-running
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{# The following states are by default inert and can be used #}
|
||||||
|
{# by other states to trigger a restart or reload as needed. #}
|
||||||
|
|
||||||
|
apache-service-running-restart:
|
||||||
|
module.wait:
|
||||||
|
{%- if apache.service_state in ['running'] %}
|
||||||
|
- name: service.restart
|
||||||
|
- m_name: {{ apache.service.name }}
|
||||||
|
{%- else %}
|
||||||
|
- name: cmd.run
|
||||||
|
- 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:
|
||||||
|
module.wait:
|
||||||
|
{%- if apache.service_state in ['running'] %}
|
||||||
|
- name: service.reload
|
||||||
|
- m_name: {{ apache.service.name }}
|
||||||
|
{%- else %}
|
||||||
|
- name: cmd.run
|
||||||
|
- 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user