1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_forgeo_runner.git synced 2024-08-16 10:29:50 +02:00
ansible_role_forgeo_runner/tasks/systemd.yml

28 lines
717 B
YAML

---
- name: "Setup systemd service"
become: true
when: ansible_os_family == "Debian"
ansible.builtin.template:
src: 'forgejo_runner.service.j2'
dest: '/lib/systemd/system/forgejo-runner.service'
owner: 'root'
group: 'root'
mode: '0644'
notify:
- 'systemctl restart forgejo-runner'
- 'systemctl daemon-reload'
- name: "Reload systemd"
become: true
ansible.builtin.systemd:
daemon_reload: true
notify: 'systemctl restart forgejo-runner'
- name: "Start and enable forgejo-runner"
become: true
ansible.builtin.systemd:
name: 'forgejo-runner'
state: started
enabled: true
when: ansible_service_mgr == "systemd"
notify: 'systemctl restart forgejo-runner'