Saltstack Official Nginx Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1234567891011121314151617181920212223242526272829303132333435363738394041
  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: {{ nginx.lookup.passenger_config_file }}
  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 %}