Saltstack Official Apache Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

69 lines
1.5KB

  1. {% if grains['os_family']=="Debian" %}
  2. include:
  3. - apache
  4. a2enmod remoteip:
  5. cmd.run:
  6. - unless: ls /etc/apache2/mods-enabled/remoteip.load
  7. - order: 255
  8. - require:
  9. - pkg: apache
  10. - watch_in:
  11. - module: apache-restart
  12. - require_in:
  13. - module: apache-restart
  14. - module: apache-reload
  15. - service: apache
  16. a2enconf remoteip:
  17. cmd.run:
  18. - unless: ls /etc/apache2/conf-enabled/remoteip.conf
  19. - order: 255
  20. - require:
  21. - pkg: apache
  22. - watch_in:
  23. - module: apache-reload
  24. - require_in:
  25. - module: apache-restart
  26. - module: apache-reload
  27. - service: apache
  28. /etc/apache2/conf-available/remoteip.conf:
  29. file.managed:
  30. - template: jinja
  31. - source:
  32. - salt://apache/files/{{ salt['grains.get']('os_family') }}/conf-available/remoteip.conf.jinja
  33. - require:
  34. - pkg: apache
  35. - watch_in:
  36. - module: apache-restart
  37. - require_in:
  38. - module: apache-restart
  39. - module: apache-reload
  40. - service: apache
  41. - cmd: a2enconf remoteip
  42. {% endif %}
  43. {% if grains['os_family']=="RedHat" %}
  44. include:
  45. - apache
  46. /etc/httpd/conf.d/remoteip.conf:
  47. file.managed:
  48. - template: jinja
  49. - source:
  50. - salt://apache/files/{{ salt['grains.get']('os_family') }}/conf.modules.d/remoteip.conf.jinja
  51. - require:
  52. - pkg: apache
  53. - watch_in:
  54. - module: apache-restart
  55. - require_in:
  56. - module: apache-restart
  57. - module: apache-reload
  58. - service: apache
  59. {% endif %}