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.

flags.sls 951B

123456789101112131415161718192021222324252627282930313233343536
  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. - require_in:
  14. - module: apache-restart
  15. - module: apache-reload
  16. - service: apache
  17. {% endfor %}
  18. {% for module in salt['pillar.get']('apache:flags:disabled', []) %}
  19. a2disflag -f {{ flag }}:
  20. cmd.run:
  21. - onlyif: egrep "^APACHE_SERVER_FLAGS=" /etc/sysconfig/apache2 | grep {{ flag }}
  22. - require:
  23. - pkg: apache
  24. - watch_in:
  25. - module: apache-restart
  26. - require_in:
  27. - module: apache-restart
  28. - module: apache-reload
  29. - service: apache
  30. {% endfor %}
  31. {% endif %}