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.

44 lines
853B

  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. /etc/apache2/conf-available/remoteip.conf:
  13. file.managed:
  14. - template: jinja
  15. - source:
  16. - salt://apache/files/{{ salt['grains.get']('os_family') }}/conf-available/remoteip.conf.jinja
  17. - require:
  18. - pkg: apache
  19. - watch_in:
  20. - service: apache
  21. {% endif %}
  22. {% if grains['os_family']=="RedHat" %}
  23. include:
  24. - apache
  25. /etc/httpd/conf.d/remoteip.conf:
  26. file.managed:
  27. - template: jinja
  28. - source:
  29. - salt://apache/files/{{ salt['grains.get']('os_family') }}/remoteip.conf.jinja
  30. - require:
  31. - pkg: apache
  32. - watch_in:
  33. - service: apache
  34. {% endif %}