42 lines
876 B
YAML
42 lines
876 B
YAML
---
|
|
- name: create gunicorn group
|
|
group:
|
|
name: gunicorn
|
|
system: true
|
|
|
|
- name: install gunicorn packages
|
|
package:
|
|
name: python-gunicorn
|
|
state: installed
|
|
|
|
- name: create runtime directory
|
|
file:
|
|
dest: /run/gunicorn
|
|
state: directory
|
|
mode: 0775
|
|
owner: root
|
|
group: gunicorn
|
|
|
|
- name: create tmpfiles config
|
|
copy:
|
|
dest: /etc/tmpfiles.d/gunicorn.conf
|
|
content: "d /run/gunicorn 775 root gunicorn\n"
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: create systemd socket template
|
|
copy:
|
|
dest: /lib/systemd/system/gunicorn@.socket
|
|
src: gunicorn.socket
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: create systemd service template
|
|
copy:
|
|
dest: /lib/systemd/system/gunicorn@.service
|
|
src: gunicorn.service
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|