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 #117 from pat-s/suse

Add Suse support
This commit is contained in:
L3D 2023-08-21 16:03:15 +02:00 committed by GitHub
commit 2fcbe19790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 1 deletions

View file

@ -9,6 +9,7 @@ gitea_version_check: true
gitea_gpg_key: '7C9E68152594688862D62AF62D9AE806EC1592E2' gitea_gpg_key: '7C9E68152594688862D62AF62D9AE806EC1592E2'
gitea_forgejo_gpg_key: 'EB114F5E6C0DC2BCDD183550A4B61A2DC5923710' gitea_forgejo_gpg_key: 'EB114F5E6C0DC2BCDD183550A4B61A2DC5923710'
gitea_gpg_server: 'hkps://keys.openpgp.org' gitea_gpg_server: 'hkps://keys.openpgp.org'
gitea_gpg_keyserver_option: ''
gitea_backup_on_upgrade: false gitea_backup_on_upgrade: false
gitea_backup_location: "{{ gitea_home }}/backups/" gitea_backup_location: "{{ gitea_home }}/backups/"
submodules_versioncheck: false submodules_versioncheck: false

View file

@ -59,7 +59,7 @@
verbosity: 1 verbosity: 1
- name: Import gitea gpg key - name: Import gitea gpg key
ansible.builtin.command: "gpg --keyserver {{ gitea_gpg_server }} --recv {{ gitea_gpg_key }}" ansible.builtin.command: "gpg --keyserver {{ gitea_gpg_server }} --keyserver-option '{{ gitea_gpg_keyserver_option }}' --recv {{ gitea_gpg_key }}"
register: _gitea_import_key register: _gitea_import_key
become: false become: false
changed_when: '"imported: 1" in _gitea_import_key.stderr' changed_when: '"imported: 1" in _gitea_import_key.stderr'

View file

@ -1,6 +1,7 @@
--- ---
- 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: /lib/systemd/system/gitea.service
@ -11,6 +12,19 @@
- "Reload systemd" - "Reload systemd"
- "Restart gitea" - "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
group: root
mode: 0644
notify:
- "Reload systemd"
- "Restart gitea"
- name: "Reload systemd" - name: "Reload systemd"
become: true become: true
ansible.builtin.systemd: ansible.builtin.systemd:

5
vars/suse.yml Normal file
View file

@ -0,0 +1,5 @@
---
gitea_dependencies:
- git
- gpg2
- xz