update path from gitea to forgejo

This commit is contained in:
meaz 2023-05-06 08:34:21 +02:00
parent 683819a324
commit 155059bf80
Signed by: meaz
GPG key ID: CD7A47B2F1ED43B4
6 changed files with 17 additions and 18 deletions

View file

@ -22,7 +22,7 @@ forgejo_download_url: 'https://github.com/go-gitea/gitea/releases/download/v{{ f
```
## Playbook
The playbook includes postgresql role and deploys entire stack needed to run Gitea. Additional roles are also available in the Ansible roles repos in git.
The playbook includes postgresql role and deploys entire stack needed to run Forgejo. Additional roles are also available in the Ansible roles repos in git.
## Customization
You can deploy custom themes with this role. To do so, uncomment `forgejo_theme_dir` and `forgejo_custom_themes` from `defaults/main.yml`. Add the theme repos' address and name there, enable them and then deploy with `ansible-playbook -b Playbooks/forgejo.yml --tags theme`.

View file

@ -1,10 +1,10 @@
---
forgejo_bindir: "/usr/local/bin/gitea"
forgejo_lib_dir: "/var/lib/gitea"
forgejo_bindir: "/usr/local/bin/forgejo"
forgejo_lib_dir: "/var/lib/forgejo"
forgejo_user: 'git'
forgejo_group: 'git'
forgejo_confdir: '/etc/gitea/app.ini'
forgejo_confdir: '/etc/forgejo/app.ini'
forgejo_flavor: 'forgejo'
forgejo_version: '1.19.3-0'
@ -41,13 +41,13 @@ forgejo_security_config:
forgejo_database_config:
- 'DB_TYPE = postgres'
- 'HOST = localhost:5432'
- 'NAME = gitea'
- 'NAME = forgejo'
- 'USER = admin'
- 'PASSWD = changeme'
- 'SSL_MODE = disable'
forgejo_repository_config:
- 'ROOT = /home/git/gitea-repositories'
- 'ROOT = /home/git/forgejo-repositories'
forgejo_server_config:
- 'SSH_DOMAIN = git.example.org'
@ -131,7 +131,7 @@ postgresql_pg_hba_default:
- { type: host, database: all, user: all, address: '127.0.0.1/32', method: '{{ postgresql_default_auth_method_hosts }}', comment: 'IPv4 local connections:' }
postgresql_databases:
- name: gitea
- name: forgejo
owner: admin # optional; specify the owner of the database
hstore: no # flag to install the hstore extension on this database (yes/no)
uuid_ossp: no # flag to install the uuid-ossp extension on this database (yes/no)
@ -144,6 +144,6 @@ postgresql_users:
postgresql_user_privileges:
- name: admin # user name
db: gitea # database
db: forgejo # database
priv: "ALL" # privilege string format: example: INSERT,UPDATE/table:SELECT/anothertable:ALL
role_attr_flags: "" # role attribute flags

View file

@ -30,7 +30,7 @@
- name: '[DIR] - Create etc dir'
file:
path: /etc/gitea
path: /etc/forgejo
state: directory
mode: '0770'
owner: "{{ forgejo_user }}"
@ -38,7 +38,7 @@
- name: '[CONF] - Deploy forgejo config'
template:
src: etc/gitea/app.ini.j2
src: etc/forgejo/app.ini.j2
dest: "{{ forgejo_confdir }}"
owner: "{{ forgejo_user }}"
group: "{{ forgejo_group }}"

View file

@ -19,19 +19,19 @@
- name: '[INSTALL] - Download forgejo binary'
get_url:
url: '{{ forgejo_download_url }}'
dest: '{{ forgejo_bindir }}/gitea'
dest: '{{ forgejo_bindir }}/forgejo'
mode: '0750'
owner: '{{ forgejo_user }}'
group: '{{ forgejo_group }}'
force: 'yes'
notify: 'Restart forgejo'
- name: '[INSTALL] - Set /etc/gitea rights to read-only'
- name: '[INSTALL] - Set /etc/forgejo rights to read-only'
file:
path: '/etc/gitea'
path: '/etc/forgejo'
mode: '0750'
- name: '[INSTALL] - Set app.ini rights to read-only'
file:
path: '/etc/gitea/app.ini'
path: '/etc/forgejo/app.ini'
mode: '0640'

View file

@ -3,7 +3,6 @@
{{ item }}
{% endfor %}
[oauth2]
{% for item in forgejo_oauth2_config %}
{{ item }}

View file

@ -19,11 +19,11 @@ RestartSec=2s
Type=simple
User={{ forgejo_user }}
Group={{ forgejo_group }}
WorkingDirectory=/var/lib/gitea/
ExecStart={{ forgejo_bindir }}/gitea web -c {{ forgejo_confdir }}
WorkingDirectory=/var/lib/forgejo/
ExecStart={{ forgejo_bindir }}/forgejo web -c {{ forgejo_confdir }}
Restart=always
RestartSec=3
Environment=USER={{ forgejo_user }} HOME=/home/{{ forgejo_user }} GITEA_WORK_DIR=/var/lib/gitea
Environment=USER={{ forgejo_user }} HOME=/home/{{ forgejo_user }} FORGEJO_WORK_DIR=/var/lib/forgejo
# If you want to bind Forgejo to a port below 1024 uncomment
# the two values below
###