apache-formula/apache/service/running.sls
Georg Pfuetzenreuter e1685ffbeb
Simplify service management
In our environment a simple state ensuring the service is running and
having it reload on configuration changes should be more than
sufficient. Additionally, remove restart retries and useless log/config
dumping on failures.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-04-29 23:28:49 +02:00

17 lines
401 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import apache with context %}
apache-service-running:
service.running:
- name: {{ apache.service.name }}
- enable: True
- reload: True
cmd.run:
- names:
- journalctl -xe -u {{ apache.service.name }} || true
- onfail:
- service: apache-service-running