Saltstack Official Apache Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
849B

  1. {% from "apache/map.jinja" import apache with context %}
  2. {% if grains['os_family']=="Debian" %}
  3. include:
  4. - apache
  5. a2enmod mod_ssl:
  6. cmd.run:
  7. - name: a2enmod ssl
  8. - unless: ls /etc/apache2/mods-enabled/ssl.load
  9. - order: 225
  10. - require:
  11. - pkg: apache
  12. - watch_in:
  13. - module: apache-restart
  14. {% elif grains['os_family']=="RedHat" %}
  15. mod_ssl:
  16. pkg.installed:
  17. - require:
  18. - pkg: apache
  19. - watch_in:
  20. - module: apache-restart
  21. {% elif grains['os_family']=="FreeBSD" %}
  22. include:
  23. - apache
  24. - apache.mod_socache_shmcb
  25. {{ apache.modulesdir }}/010_mod_ssl.conf:
  26. file.managed:
  27. - source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_ssl.conf.jinja
  28. - mode: 644
  29. - template: jinja
  30. - require:
  31. - pkg: apache
  32. - watch_in:
  33. - module: apache-restart
  34. {% endif %}