Saltstack Official Apache Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

mod_geoip.sls 901B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 %}