Saltstack Official Apache Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

53 rindas
1.5KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {%- set tplroot = tpldir.split('/')[0] %}
  4. {%- set sls_service_running = tplroot ~ '.service.running' %}
  5. {%- from tplroot ~ "/map.jinja" import apache with context %}
  6. include:
  7. - {{ sls_service_running }}
  8. {%- for site, cert in salt['pillar.get']('apache:sites', {}).items() %}
  9. {%- if cert.SSLCertificateKeyFile is defined %}
  10. apache_cert_config_clean_{{ site }}_key_file:
  11. file.absent:
  12. - name: {{ cert.SSLCertificateKeyFile }}
  13. - watch_in:
  14. - module: apache-service-running-reload
  15. - require_in:
  16. - module: apache-service-running-restart
  17. - module: apache-service-running-reload
  18. - service: apache-service-running
  19. {%- endif %}
  20. {%- if cert.SSLCertificateFile is defined %}
  21. apache_cert_config_clean_{{ site }}_cert_file:
  22. file.absent:
  23. - name: {{ cert.SSLCertificateFile }}
  24. - watch_in:
  25. - module: apache-service-running-reload
  26. - require_in:
  27. - module: apache-service-running-restart
  28. - module: apache-service-running-reload
  29. - service: apache-service-running
  30. {%- endif %}
  31. {%- if cert.SSLCertificateChainFile is defined %}
  32. apache_cert_config_clean_{{ site }}_bundle_file:
  33. file.managed:
  34. - name: {{ cert.SSLCertificateChainFile }}
  35. - watch_in:
  36. - module: apache-service-running-reload
  37. - require_in:
  38. - module: apache-service-running-restart
  39. - module: apache-service-running-reload
  40. - service: apache-service-running
  41. {%- endif %}
  42. {%- endfor %}