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.

54 lines
1.3 KiB

  1. ---
  2. - name: Create gunicorn service file
  3. template:
  4. src: gunicorn.service.jinja2
  5. dest: /etc/systemd/system/gunicorn.service
  6. owner: root
  7. group: root
  8. mode: 0644
  9. - name: Create gunicorn socket file
  10. template:
  11. src: gunicorn.socket.jinja2
  12. dest: /etc/systemd/system/gunicorn.socket
  13. owner: root
  14. group: root
  15. mode: 0644
  16. - name: Create gunicorn tmpfiles.d configuration file
  17. template:
  18. src: gunicorn.conf.jinja2
  19. dest: /usr/lib/tmpfiles.d/gunicorn.conf
  20. owner: root
  21. group: root
  22. mode: 0644
  23. - name: Start and enable gunicorn.socket service
  24. service:
  25. name: gunicorn.socket
  26. state: started
  27. enabled: true
  28. # Set up the gunicorn_reloader service, which reloads gunicorn whenever certain files
  29. # are changed (such as static files, to update the cache-busting strings)
  30. - name: Create gunicorn_reloader service file
  31. copy:
  32. src: gunicorn_reloader.service
  33. dest: /etc/systemd/system/gunicorn_reloader.service
  34. owner: root
  35. group: root
  36. mode: 0644
  37. - name: Create gunicorn_reloader path-monitoring file
  38. copy:
  39. src: gunicorn_reloader.path
  40. dest: /etc/systemd/system/gunicorn_reloader.path
  41. owner: root
  42. group: root
  43. mode: 0644
  44. - name: Start and enable gunicorn_reloader path-monitoring service
  45. service:
  46. name: gunicorn_reloader.path
  47. state: started
  48. enabled: true