diff --git a/README.md b/README.md index aee909f..1732317 100644 --- a/README.md +++ b/README.md @@ -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) [![Maintainance](https://ansible.l3d.space/svg/l3d.gitea_maintainance.svg)](https://ansible.l3d.space/#l3d.gitea) diff --git a/tasks/install_systemd.yml b/tasks/install_systemd.yml index 1d0084a..6a441cb 100644 --- a/tasks/install_systemd.yml +++ b/tasks/install_systemd.yml @@ -1,23 +1,9 @@ --- - name: "Setup systemd service" become: true - when: ansible_os_family == "Debian" ansible.builtin.template: src: gitea.service.j2 - dest: /lib/systemd/system/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 + dest: "{{ gitea_systemd_path }}/gitea.service" owner: root group: root mode: 0644 diff --git a/vars/debian.yml b/vars/debian.yml index dc164f6..784471f 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -3,3 +3,5 @@ gitea_dependencies: - git - gnupg2 - xz-utils + +gitea_systemd_path: '/lib/systemd/system' diff --git a/vars/main.yml b/vars/main.yml index 34d8ea4..cb466f6 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -23,6 +23,7 @@ gitea_variables: - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" - "{{ ansible_distribution | lower }}.yml" - "{{ ansible_os_family | lower }}.yml" + - 'os_fallback_defaults.yml' paths: - 'vars' @@ -62,5 +63,5 @@ transfer_custom_footer: - 'files/gitea_footer/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl' -playbook_version_number: 55 +playbook_version_number: 56 playbook_version_path: 'do1jlr.gitea.version' diff --git a/vars/os_fallback_defaults.yml b/vars/os_fallback_defaults.yml new file mode 100644 index 0000000..784471f --- /dev/null +++ b/vars/os_fallback_defaults.yml @@ -0,0 +1,7 @@ +--- +gitea_dependencies: + - git + - gnupg2 + - xz-utils + +gitea_systemd_path: '/lib/systemd/system' diff --git a/vars/redhat.yml b/vars/redhat.yml index 7c96415..393ab8d 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -3,3 +3,5 @@ gitea_dependencies: - git - gnupg2 - xz + +gitea_systemd_path: '/lib/systemd/system' diff --git a/vars/suse.yml b/vars/suse.yml index 027026e..157ba4d 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -3,3 +3,5 @@ gitea_dependencies: - git - gpg2 - xz + +gitea_systemd_path: '/etc/systemd/system'