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.

29 lines
627B

  1. {% if grains['os_family']=="Debian" %}
  2. include:
  3. - apache
  4. {% for module in salt['pillar.get']('apache:modules:enabled', []) %}
  5. a2enmod {{ module }}:
  6. cmd.run:
  7. - unless: ls /etc/apache2/mods-enabled/{{ module }}.load
  8. - order: 225
  9. - require:
  10. - pkg: apache
  11. - watch_in:
  12. - module: apache-restart
  13. {% endfor %}
  14. {% for module in salt['pillar.get']('apache:modules:disabled', []) %}
  15. a2dismod {{ module }}:
  16. cmd.run:
  17. - onlyif: ls /etc/apache2/mods-enabled/{{ module }}.load
  18. - order: 225
  19. - require:
  20. - pkg: apache
  21. - watch_in:
  22. - module: apache-restart
  23. {% endfor %}
  24. {% endif %}