Saltstack Official Nginx Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1015B

  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 %}