Saltstack Official Apache Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

44 rindas
900B

  1. {% from "apache/map.jinja" import apache with context %}
  2. {% if 'mod_geoip' in apache %}
  3. include:
  4. - apache
  5. mod-geoip:
  6. pkg.installed:
  7. - pkgs:
  8. - {{ apache.mod_geoip }}
  9. - {{ apache.mod_geoip_database }}
  10. - require:
  11. - pkg: apache
  12. - watch_in:
  13. - module: apache-restart
  14. - require_in:
  15. - module: apache-restart
  16. - module: apache-reload
  17. - service: apache
  18. {% if grains['os_family']=="RedHat" %}
  19. geoip conf:
  20. file.managed:
  21. - name: {{ apache.confdir }}/geoip.conf
  22. - user: root
  23. - group: root
  24. - mode: 644
  25. - source:
  26. - salt://apache/files/{{ salt['grains.get']('os_family') }}/geoip.conf
  27. geoip database:
  28. file.managed:
  29. - name: /usr/share/GeoIP/GeoIP.dat
  30. - user: root
  31. - group: root
  32. - mode: 644
  33. - source:
  34. - salt://apache/files/{{ salt['grains.get']('os_family') }}/GeoIP.dat
  35. {% endif %}
  36. {% endif %}