Saltstack Official Nginx Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

package.sls 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. nginx-old-init:
  2. file:
  3. - rename
  4. - name: /usr/share/nginx/init.d
  5. - source: /etc/init.d/nginx
  6. - require_in:
  7. - file: nginx
  8. cmd:
  9. - wait
  10. - name: dpkg-divert --divert /usr/share/nginx/init.d --add /etc/init.d/nginx
  11. - require:
  12. - module: nginx-old-init
  13. - watch:
  14. - file: nginx-old-init
  15. - require_in:
  16. - file: nginx
  17. module:
  18. - wait
  19. - name: cmd.run
  20. - cmd: kill `cat /var/run/nginx.pid`
  21. - watch:
  22. - file: nginx-old-init
  23. - require_in:
  24. - file: nginx
  25. nginx-old-init-disable:
  26. cmd:
  27. - wait
  28. - name: update-rc.d -f nginx remove
  29. - require:
  30. - module: nginx-old-init
  31. - watch:
  32. - file: nginx-old-init
  33. nginx:
  34. pkg.installed:
  35. - name: nginx
  36. file:
  37. - managed
  38. - name: /etc/init/nginx.conf
  39. - template: jinja
  40. - user: root
  41. - group: root
  42. - mode: 440
  43. - source: salt://nginx/templates/upstart.jinja
  44. - require:
  45. - pkg: nginx
  46. - file: nginx-old-init
  47. - module: nginx-old-init
  48. service:
  49. - running
  50. - enable: True
  51. - restart: True
  52. - watch:
  53. - file: nginx
  54. - file: /etc/nginx/nginx.conf
  55. - file: /etc/nginx/conf.d/default.conf
  56. - file: /etc/nginx/conf.d/example_ssl.conf
  57. - pkg: nginx