1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_collection_pretix.git synced 2024-10-28 22:01:03 +01:00
ansible_collection_pretix/roles/pretix/tasks/systemd.yml
2024-10-14 12:06:26 +02:00

42 lines
1.1 KiB
YAML

---
- name: Create pretix-web service unit
become: true
ansible.builtin.template:
src: 'templates/pretix-web.service.j2'
dest: '/etc/systemd/system/pretix-web.service'
owner: 'root'
group: 'root'
mode: '0644'
notify: 'systemctl restart pretix-web.service'
- name: Create pretix-worker service unit
become: true
ansible.builtin.template:
src: 'templates/pretix-worker.service.j2'
dest: '/etc/systemd/system/pretix-worker.service'
owner: 'root'
group: 'root'
mode: '0644'
notify: 'systemctl restart pretix-worker.service'
- name: Create pretix-cron service unit
become: true
ansible.builtin.template:
src: 'templates/pretix-cron.timer.j2'
dest: '/etc/systemd/system/pretix-cron.service'
owner: 'root'
group: 'root'
mode: '0644'
notify: 'systemctl restart pretix-cron.service'
- name: Make sure services are started
become: true
ansible.builtin.systemd_service:
name: "{{ item }}"
state: 'restarted'
daemon_reload: true
enabled: true
with_items:
- 'pretix-web'
- 'pretix-worker'
- 'pretix-cron'