mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
prepare to use forgejo fork
This commit is contained in:
parent
c28072f05f
commit
768f1fd4ad
6 changed files with 29 additions and 0 deletions
|
@ -31,6 +31,13 @@ The following code has been tested with the latest Debian Stable, it should work
|
|||
-----------
|
||||
Here is a deeper insight into the variables of this gitea role. For the exact function of some variables and the possibility to add more options we recommend a look at this [config cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet/).
|
||||
|
||||
### Chose between gitea and forgejo
|
||||
There is a fork of gitea called forgejo. Why? Read the [forgejo FAQ](https://forgejo.org/faq/).
|
||||
You have the option to choose between [gitea](https://gitea.io) and [forgejo](https://forgejo.org) by modifying the ``gitea_fork`` variable.
|
||||
| variable name | default value | description |
|
||||
| ------------- | ------------- | ----------- |
|
||||
| `gitea_fork` | `gitea` | optional choose to install forgejo instead of gitea by setting this value to `forgejo`. |
|
||||
|
||||
### gitea update mechanism
|
||||
To determine which gitea version to install, you can choose between two variants.
|
||||
Either you define exactly which release you install. Or you use the option ``latest`` to always install the latest release from the [gitea releases](https://github.com/go-gitea/gitea/releases/latest).
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
---
|
||||
# Choose between https://forgejo.org/ and https://gitea.io/
|
||||
gitea_fork: 'gitea' # 'gitea' and 'forgejo' are valid options
|
||||
|
||||
# gitea version
|
||||
# Use 'latest' to auto-update; upgrading past role version may lead to errors.
|
||||
gitea_version: 'latest'
|
||||
gitea_version_check: true
|
||||
gitea_gpg_key: '7C9E68152594688862D62AF62D9AE806EC1592E2'
|
||||
gitea_forgejo_gpg_key: 'EB114F5E6C0DC2BCDD183550A4B61A2DC5923710'
|
||||
gitea_gpg_server: 'hkps://keys.openpgp.org'
|
||||
gitea_backup_on_upgrade: false
|
||||
gitea_backup_location: "{{ gitea_home }}/backups/"
|
||||
|
|
|
@ -7,6 +7,15 @@
|
|||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
|
||||
- name: Prepare gitea/forgejo variable import
|
||||
block:
|
||||
- name: Gather variables for gitea or forgejo
|
||||
ansible.builtin.include_vars: "{{ lookup('first_found', gitea_fork_variables) }}"
|
||||
rescue:
|
||||
- name: Gitea/Forejo import info
|
||||
ansible.builtin.fail:
|
||||
msg: "Currently only {{ gitea_supported_forks }} are supported."
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
ansible.builtin.include_vars: "{{ lookup('first_found', gitea_variables) }}"
|
||||
|
||||
|
|
1
vars/fork_forgejo.yml
Normal file
1
vars/fork_forgejo.yml
Normal file
|
@ -0,0 +1 @@
|
|||
---
|
1
vars/fork_gitea.yml
Normal file
1
vars/fork_gitea.yml
Normal file
|
@ -0,0 +1 @@
|
|||
---
|
|
@ -9,6 +9,13 @@ gitea_go_arch_map:
|
|||
|
||||
gitea_arch: "{{ gitea_go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
|
||||
gitea_filename: "gitea-{{ gitea_version_target }}.linux-{{ gitea_arch }}"
|
||||
gitea_supported_forks: 'gitea and forgejo'
|
||||
|
||||
gitea_fork_variables:
|
||||
files:
|
||||
- "fork_{{ gitea_fork | lower }}.yml"
|
||||
paths:
|
||||
- 'vars'
|
||||
|
||||
gitea_variables:
|
||||
files:
|
||||
|
|
Loading…
Reference in a new issue