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.

34 lines
716B

  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. a2enconf remoteip:
  13. cmd.run:
  14. - unless: ls /etc/apache2/mods-enabled/remoteip.load
  15. - order: 255
  16. - require:
  17. - pkg: apache
  18. - watch_in:
  19. - module: apache-reload
  20. /etc/apache2/conf-available/remoteip.conf:
  21. file.managed:
  22. - template: jinja
  23. - source:
  24. - salt://apache/files/{{ salt['grains.get']('os_family') }}/conf-available/remoteip.conf.jinja
  25. - require:
  26. - pkg: apache
  27. - watch_in:
  28. - service: apache
  29. {% endif %}