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.

33 satır
981B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {%- set tplroot = tpldir.split('/')[0] %}
  4. {%- set sls_package_install = tplroot ~ '.package.install' %}
  5. {%- set sls_service_running = tplroot ~ '.service.running' %}
  6. {%- from tplroot ~ "/map.jinja" import apache with context %}
  7. {%- if grains.os_family == "Debian" %}
  8. include:
  9. - {{ sls_package_install }}
  10. - {{ sls_service_running }}
  11. apache-config-own-default-vhost:
  12. file.managed:
  13. - name: {{ apache.vhostdir }}/000-default.conf
  14. - source: salt://apache/files/Debian/sites-available/000-default.conf
  15. - makedirs: True
  16. - template: {{ apache.get('template_engine', 'jinja') }}
  17. - context:
  18. apache: {{ apache|json }}
  19. - require:
  20. - pkg: apache-package-install-pkg-installed
  21. - watch_in:
  22. - module: apache-service-running-reload
  23. - require_in:
  24. - module: apache-service-running-restart
  25. - module: apache-service-running-reload
  26. - service: apache-service-running
  27. {%- endif %}