Saltstack Official Nginx Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

42 lines
1007B

  1. # nginx.ng.passenger
  2. #
  3. # Manages installation of passenger from repo.
  4. # Requires install_from_phusionpassenger = True
  5. {% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
  6. {% if salt['grains.get']('os_family') in ['Debian', 'RedHat'] %}
  7. include:
  8. - nginx.ng.pkg
  9. - nginx.ng.service
  10. passenger_install:
  11. pkg.installed:
  12. - name: {{ nginx.lookup.passenger_package }}
  13. - require:
  14. - pkg: nginx_install
  15. - require_in:
  16. - service: nginx_service
  17. /etc/nginx/passenger.conf:
  18. file.absent:
  19. - require:
  20. - pkg: passenger_install
  21. passenger_config:
  22. file.managed:
  23. {{ sls_block(nginx.server.opts) }}
  24. - name: /etc/nginx/conf.d/passenger.conf
  25. - source: salt://nginx/ng/files/nginx.conf
  26. - template: jinja
  27. - context:
  28. config: {{ nginx.passenger|json() }}
  29. - watch_in:
  30. - service: nginx_service
  31. - require_in:
  32. - service: nginx_service
  33. - require:
  34. - file: /etc/nginx/passenger.conf
  35. - pkg: passenger_install
  36. {% endif %}