2020-09-13 06:07:20 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
2021-09-14 21:54:31 +02:00
|
|
|
{%- set sls_service_clean = tplroot ~ '.service.clean' %}
|
2020-09-13 06:07:20 +02:00
|
|
|
{%- from tplroot ~ "/map.jinja" import apache with context %}
|
|
|
|
|
|
|
|
include:
|
2021-09-14 21:54:31 +02:00
|
|
|
- {{ sls_service_clean }}
|
2020-09-13 06:07:20 +02:00
|
|
|
|
|
|
|
{%- for site, cert in salt['pillar.get']('apache:sites', {}).items() %}
|
|
|
|
|
|
|
|
{%- if cert.SSLCertificateKeyFile is defined %}
|
|
|
|
|
|
|
|
apache_cert_config_clean_{{ site }}_key_file:
|
|
|
|
file.absent:
|
|
|
|
- name: {{ cert.SSLCertificateKeyFile }}
|
2021-09-14 21:54:31 +02:00
|
|
|
- require:
|
|
|
|
- sls: {{ sls_service_clean }}
|
2020-09-13 06:07:20 +02:00
|
|
|
|
|
|
|
{%- endif %}
|
|
|
|
{%- if cert.SSLCertificateFile is defined %}
|
|
|
|
|
|
|
|
apache_cert_config_clean_{{ site }}_cert_file:
|
|
|
|
file.absent:
|
|
|
|
- name: {{ cert.SSLCertificateFile }}
|
2021-09-14 21:54:31 +02:00
|
|
|
- require:
|
|
|
|
- sls: {{ sls_service_clean }}
|
2020-09-13 06:07:20 +02:00
|
|
|
|
|
|
|
{%- endif %}
|
|
|
|
{%- if cert.SSLCertificateChainFile is defined %}
|
|
|
|
|
|
|
|
apache_cert_config_clean_{{ site }}_bundle_file:
|
2021-09-14 21:54:31 +02:00
|
|
|
file.absent:
|
2020-09-13 06:07:20 +02:00
|
|
|
- name: {{ cert.SSLCertificateChainFile }}
|
2021-09-14 21:54:31 +02:00
|
|
|
- require:
|
|
|
|
- sls: {{ sls_service_clean }}
|
2020-09-13 06:07:20 +02:00
|
|
|
|
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|