Saltstack Official Apache Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

29 行
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 %}