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
745B

  1. {% from "apache/map.jinja" import apache with context %}
  2. {% if salt['grains.get']('os_family') == 'Suse' or salt['grains.get']('os') == 'SUSE' %}
  3. include:
  4. - apache
  5. {% for flag in salt['pillar.get']('apache:flags:enabled', []) %}
  6. a2enflag {{ flag }}:
  7. cmd.run:
  8. - unless: egrep "^APACHE_SERVER_FLAGS=" /etc/sysconfig/apache2 | grep {{ flag }}
  9. - require:
  10. - pkg: apache
  11. - watch_in:
  12. - module: apache-restart
  13. {% endfor %}
  14. {% for module in salt['pillar.get']('apache:flags:disabled', []) %}
  15. a2disflag -f {{ flag }}:
  16. cmd.run:
  17. - onlyif: egrep "^APACHE_SERVER_FLAGS=" /etc/sysconfig/apache2 | grep {{ flag }}
  18. - require:
  19. - pkg: apache
  20. - watch_in:
  21. - module: apache-restart
  22. {% endfor %}
  23. {% endif %}