SuperTux88's Diaspora Saltstack Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

84 lines
2.0KB

  1. {%- from "diaspora/map.jinja" import diaspora with context %}
  2. include:
  3. - diaspora.install
  4. - diaspora.config
  5. /etc/systemd/system/diaspora-sidekiq.service:
  6. file.managed:
  7. - user: root
  8. - mode: 644
  9. - source: salt://diaspora/files/diaspora-sidekiq.service
  10. - template: jinja
  11. - context:
  12. diaspora: {{ diaspora|json }}
  13. /etc/systemd/system/diaspora-web.service:
  14. file.managed:
  15. - user: root
  16. - mode: 644
  17. - source: {{ diaspora.systemd.web_template }}
  18. - template: jinja
  19. - context:
  20. diaspora: {{ diaspora|json }}
  21. /etc/systemd/system/diaspora.target:
  22. file.managed:
  23. - user: root
  24. - mode: 644
  25. - source: salt://diaspora/files/diaspora.target
  26. - template: jinja
  27. - context:
  28. diaspora: {{ diaspora|json }}
  29. {%- if diaspora.install_redis %}
  30. redis_service:
  31. service.running:
  32. - name: {{ diaspora.redis_service }}
  33. - require:
  34. - pkg: redis_package
  35. - require_in:
  36. - service: diaspora_service
  37. {%- endif %}
  38. diaspora_sidekiq_service:
  39. service.enabled:
  40. - name: diaspora-sidekiq
  41. - require:
  42. - file: /etc/systemd/system/diaspora-sidekiq.service
  43. diaspora_web_service:
  44. service.enabled:
  45. - name: diaspora-web
  46. - require:
  47. - file: /etc/systemd/system/diaspora-web.service
  48. diaspora_service:
  49. service.running:
  50. - name: diaspora.target
  51. - enable: True
  52. - require:
  53. - cmd: diaspora_precompile_assets
  54. - file: /etc/systemd/system/diaspora.target
  55. - service: diaspora_sidekiq_service
  56. - service: diaspora_web_service
  57. diaspora_sidekiq_service_restart:
  58. service.running:
  59. - name: diaspora-sidekiq.service
  60. - require:
  61. - service: diaspora_service
  62. - watch:
  63. - git: diaspora_git
  64. - file: {{ diaspora.install_path }}/config/database.yml
  65. - file: {{ diaspora.install_path }}/config/diaspora.yml
  66. diaspora_web_service_restart:
  67. service.running:
  68. - name: diaspora-web.service
  69. - reload: True
  70. - require:
  71. - service: diaspora_service
  72. - watch:
  73. - service: diaspora_sidekiq_service_restart