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

51 行
1.4KB

  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. {%- set sls_config_registersite = tplroot ~ '.config.register_site' %}
  7. {%- from tplroot ~ "/map.jinja" import apache with context %}
  8. {%- if grains.os_family in ('Debian',) %}
  9. include:
  10. - {{ sls_package_install }}
  11. - {{ sls_service_running }}
  12. - {{ sls_config_registersite }}
  13. extend:
  14. apache-package-install-pkg-installed:
  15. pkg:
  16. - order: 175
  17. apache-service-running:
  18. service:
  19. - order: 455
  20. apache-service-running-reload:
  21. module:
  22. - order: 420
  23. apache-service-running-restart:
  24. module:
  25. - order: 425
  26. apache-config-debian-full-cmd-run:
  27. cmd.run:
  28. - name: a2dissite 000-default{{ apache.confext }} || true
  29. - onlyif: test -f /etc/apache2/sites-enabled/000-default{{ apache.confext }}
  30. - watch_in:
  31. - module: apache-service-running-reload
  32. - require_in:
  33. - module: apache-service-running-restart
  34. - module: apache-service-running-reload
  35. - service: apache-service-running
  36. - require:
  37. - pkg: apache-package-install-pkg-installed
  38. file.absent:
  39. - names:
  40. - /etc/apache2/sites-available/{{ apache.default_site }}
  41. - /etc/apache2/sites-available/{{ apache.default_site_ssl }}
  42. - require:
  43. - pkg: apache-package-install-pkg-installed
  44. {%- endif %} #END: os = debian