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

29 lines
717 B
YAML
Raw Normal View History

2024-03-21 15:23:41 +01:00
---
- 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'