Saltstack Official Apache Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

36 lines
917B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {%- set tplroot = tpldir.split('/')[0] %}
  4. {%- from tplroot ~ "/map.jinja" import apache with context %}
  5. {%- if 'deps' in apache.pkg and apache.pkg.deps and apache.pkg.deps is iterable and apache.pkg.deps is not string %}
  6. apache-package-install-deps-pkg-installed:
  7. pkg.installed:
  8. - names: {{ apache.pkg.deps|json }}
  9. - require:
  10. - apache-package-install-pkg-installed
  11. {%- endif %}
  12. apache-package-install-pkg-installed:
  13. {%- if grains.os_family == 'Windows' %}
  14. service.dead:
  15. - name: {{ apache.service.name }} # port 8080
  16. chocolatey.installed:
  17. - name: {{ apache.pkg.name }}
  18. - force: True
  19. {%- else %}
  20. pkg.installed:
  21. - name: {{ apache.pkg.name }}
  22. group.present:
  23. - name: {{ apache.group }}
  24. - system: True
  25. user.present:
  26. - name: {{ apache.user }}
  27. - gid: {{ apache.group }}
  28. - system: True
  29. {%- endif %}