Saltstack Official Nginx 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.

35 lines
938B

  1. # nginx.ng.install
  2. #
  3. # Manages installation of nginx.
  4. {% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
  5. nginx_install:
  6. {% if nginx.install_from_source %}
  7. ## add source compilation here
  8. {% else %}
  9. pkg.installed:
  10. {{ sls_block(nginx.package.opts) }}
  11. - name: {{ nginx.lookup.package }}
  12. {% endif %}
  13. {% if salt['grains.get']('os_family') == 'Debian' %}
  14. nginx_ppa_repo:
  15. pkgrepo:
  16. {%- if nginx.install_from_ppa %}
  17. - managed
  18. {%- else %}
  19. - absent
  20. {%- endif %}
  21. - humanname: nginx-ppa-{{ grains['oscodename'] }}
  22. - name: deb http://ppa.launchpad.net/nginx/stable/ubuntu {{ grains['oscodename'] }} main
  23. - file: /etc/apt/sources.list.d/nginx-stable-{{ grains['oscodename'] }}.list
  24. - dist: {{ grains['oscodename'] }}
  25. - keyid: C300EE8C
  26. - keyserver: keyserver.ubuntu.com
  27. - require_in:
  28. - pkg: nginx_install
  29. - watch_in:
  30. - pkg: nginx_install
  31. {% endif %}