1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

Merge pull request #145 from roles-ansible/systemd

Create systemd unit for all systems
This commit is contained in:
L3D 2024-01-25 00:06:18 +01:00 committed by GitHub
commit 7857a62eb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 17 deletions

View file

@ -1,4 +1,4 @@
[![Ansible Galaxy](https://ansible.l3d.space/svg/l3d.gitea.svg)](https://galaxy.ansible.com/ui/standalone/roles/l3d/gitea/) [![Ansible Galaxy](https://ansible.l3d.space/svg/l3d.gitea.svg)](https://galaxy.ansible.com/ui/standalone/roles/roles-ansible/gitea/)
[![BSD-3 Clause](https://ansible.l3d.space/svg/l3d.gitea_license.svg)](LICENSE) [![BSD-3 Clause](https://ansible.l3d.space/svg/l3d.gitea_license.svg)](LICENSE)
[![Maintainance](https://ansible.l3d.space/svg/l3d.gitea_maintainance.svg)](https://ansible.l3d.space/#l3d.gitea) [![Maintainance](https://ansible.l3d.space/svg/l3d.gitea_maintainance.svg)](https://ansible.l3d.space/#l3d.gitea)

View file

@ -1,23 +1,9 @@
--- ---
- name: "Setup systemd service" - name: "Setup systemd service"
become: true become: true
when: ansible_os_family == "Debian"
ansible.builtin.template: ansible.builtin.template:
src: gitea.service.j2 src: gitea.service.j2
dest: /lib/systemd/system/gitea.service dest: "{{ gitea_systemd_path }}/gitea.service"
owner: root
group: root
mode: 0644
notify:
- "Reload systemd"
- "Restart gitea"
- name: "Setup systemd service"
become: true
when: ansible_os_family == "Suse"
ansible.builtin.template:
src: gitea.service.j2
dest: /etc/systemd/system/gitea.service
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644

View file

@ -3,3 +3,5 @@ gitea_dependencies:
- git - git
- gnupg2 - gnupg2
- xz-utils - xz-utils
gitea_systemd_path: '/lib/systemd/system'

View file

@ -23,6 +23,7 @@ gitea_variables:
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_distribution | lower }}.yml" - "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}.yml" - "{{ ansible_os_family | lower }}.yml"
- 'os_fallback_defaults.yml'
paths: paths:
- 'vars' - 'vars'
@ -62,5 +63,5 @@ transfer_custom_footer:
- 'files/gitea_footer/extra_links_footer.tmpl' - 'files/gitea_footer/extra_links_footer.tmpl'
- 'files/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl'
playbook_version_number: 55 playbook_version_number: 56
playbook_version_path: 'do1jlr.gitea.version' playbook_version_path: 'do1jlr.gitea.version'

View file

@ -0,0 +1,7 @@
---
gitea_dependencies:
- git
- gnupg2
- xz-utils
gitea_systemd_path: '/lib/systemd/system'

View file

@ -3,3 +3,5 @@ gitea_dependencies:
- git - git
- gnupg2 - gnupg2
- xz - xz
gitea_systemd_path: '/lib/systemd/system'

View file

@ -3,3 +3,5 @@ gitea_dependencies:
- git - git
- gpg2 - gpg2
- xz - xz
gitea_systemd_path: '/etc/systemd/system'