|
|
@ -29,35 +29,8 @@ |
|
|
|
state: started |
|
|
|
enabled: true |
|
|
|
|
|
|
|
# Set up the gunicorn_reloader service, which reloads gunicorn whenever certain files |
|
|
|
# are changed (such as static files, to update the cache-busting strings) |
|
|
|
- name: Create gunicorn_reloader service file |
|
|
|
copy: |
|
|
|
src: gunicorn_reloader.service |
|
|
|
dest: /etc/systemd/system/gunicorn_reloader.service |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
mode: 0644 |
|
|
|
|
|
|
|
- name: Create gunicorn_reloader path-monitoring file |
|
|
|
copy: |
|
|
|
src: gunicorn_reloader.path |
|
|
|
dest: /etc/systemd/system/gunicorn_reloader.path |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
mode: 0644 |
|
|
|
|
|
|
|
- name: Start and enable gunicorn_reloader path-monitoring service, with fallback |
|
|
|
block: |
|
|
|
- name: Start and enable gunicorn_reloader path-monitoring service |
|
|
|
systemd_service: |
|
|
|
name: gunicorn_reloader.path |
|
|
|
state: started |
|
|
|
enabled: true |
|
|
|
rescue: |
|
|
|
# Likely Docker; systemctl3.py doesn't support .path, so enable .service here |
|
|
|
- name: Start and enable gunicorn.service (if .path service fails) |
|
|
|
systemd_service: |
|
|
|
name: gunicorn.service |
|
|
|
state: started |
|
|
|
enabled: true |
|
|
|
- name: Start and enable gunicorn service |
|
|
|
systemd_service: |
|
|
|
name: gunicorn.service |
|
|
|
state: started |
|
|
|
enabled: true |