Adjust based on test run

This commit is contained in:
Louis Abel 2024-12-22 19:26:29 -07:00
parent 2bf6a63f3c
commit d90ab6316d
Signed by: label
GPG key ID: 2A6975660E424560
22 changed files with 43 additions and 33 deletions

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -1,5 +1,6 @@
--- ---
# Defaults # Defaults
# Set adjustments in another group vars file or via extra vars
forgejo_version: "9.0.3" forgejo_version: "9.0.3"
forgejo_arch: "amd64" forgejo_arch: "amd64"
forgejo_web_install: "httpd" forgejo_web_install: "httpd"
@ -24,6 +25,9 @@ forgejo_directory_list:
- "/var/lib/forgejo/custom" - "/var/lib/forgejo/custom"
- "/var/lib/forgejo/custom/https" - "/var/lib/forgejo/custom/https"
- "/var/lib/forgejo/custom/mailer" - "/var/lib/forgejo/custom/mailer"
- "/var/lib/forgejo/custom/templates"
- "/var/lib/forgejo/custom/templates/user"
- "/var/lib/forgejo/custom/templates/user/auth"
- "/var/lib/forgejo/data" - "/var/lib/forgejo/data"
- "/var/lib/forgejo/log" - "/var/lib/forgejo/log"
... ...

View file

@ -1,8 +1,8 @@
--- ---
# Handlers # Handlers
- name: restart_gitea - name: restart_forgejo
service: service:
name: gitea name: forgejo
state: restarted state: restarted
- name: restart_httpd - name: restart_httpd

1
hosts Normal file
View file

@ -0,0 +1 @@
idp.angelsofclockwork.net

View file

@ -8,6 +8,9 @@
- "vars/common.yml" - "vars/common.yml"
- "vars/db.yml" - "vars/db.yml"
handlers:
- import_tasks: handlers/main.yml
pre_tasks: pre_tasks:
- name: Check if ansible cannot be run here - name: Check if ansible cannot be run here
stat: stat:

View file

@ -20,7 +20,7 @@
- name: "Get Forgejo binary" - name: "Get Forgejo binary"
ansible.builtin.get_url: ansible.builtin.get_url:
url: "https://codeberg.org/forgejo/forgejo/releases/download/v{{ forgejo_version }}/forgejo-{{ forgejo_version }}-linux-{{ forgejo_arch }}" url: "https://codeberg.org/forgejo/forgejo/releases/download/v{{ forgejo_version }}/forgejo-{{ forgejo_version }}-linux-{{ forgejo_arch }}"
dest: "/usr/local/bin/{{ forgejo_binary_name }}" dest: "/usr/local/bin/forgejo-{{ forgejo_version }}-linux-{{ forgejo_arch }}"
checksum: "sha256:{{ forgejo_sha_verif }}" checksum: "sha256:{{ forgejo_sha_verif }}"
mode: "0755" mode: "0755"
register: forgejo_content register: forgejo_content

View file

@ -1,8 +1,8 @@
logins: logins:
- name: "{{ gitea_basename }}" - name: "{{ forgejo_basename }}"
url: "https://{{ gitea_basename }}" url: "https://{{ forgejo_basename }}"
token: "{{ gitea_token }}" token: "{{ forgejo_token }}"
default: true default: true
insecure: false insecure: false
user: "{{ gitea_automation_user }}" user: "{{ forgejo_automation_user }}"
created: 1644820631 created: 1644820631

View file

@ -4,13 +4,14 @@ RUN_MODE = prod
WORK_PATH = /var/lib/forgejo WORK_PATH = /var/lib/forgejo
[database] [database]
DB_TYPE = postgres DB_TYPE = sqlite
HOST = {{ forgejo_database_host }} HOST = {{ forgejo_database_host|default('127.0.0.1:3306') }}
NAME = {{ forgejo_database_name }} NAME = {{ forgejo_database_name|default('forgejo') }}
USER = {{ forgejo_database_user }} USER = {{ forgejo_database_user|default('forgejo') }}
PASSWD = {{ forgejo_database_pass }} PASSWD = {{ forgejo_database_pass|default('') }}
SCHEMA = SCHEMA =
SSL_MODE = {{ forgejo_database_ssl|default('disabled') }} SSL_MODE = {{ forgejo_database_ssl|default('disabled') }}
PATH = /var/lib/gitea/data/gitea.db
CHARSET = utf8 CHARSET = utf8
LOG_SQL = false LOG_SQL = false

View file

@ -1,19 +1,19 @@
<VirtualHost *:80> <VirtualHost *:80>
ServerName {{ gitea_basename }} ServerName {{ forgejo_basename }}
ServerAlias {{ gitea_basename }} ServerAlias {{ forgejo_basename }}
ProxyPreserveHost On ProxyPreserveHost On
ProxyRequests Off ProxyRequests Off
AllowEncodedSlashes NoDecode AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:3000/ nocanon ProxyPass / http://localhost:3000/ nocanon
ProxyPassReverse / http://localhost:3000/ nocanon ProxyPassReverse / http://localhost:3000/ nocanon
ServerAdmin {{ gitea_server_admin }} ServerAdmin {{ forgejo_server_admin }}
</VirtualHost> </VirtualHost>
<VirtualHost *:443> <VirtualHost *:443>
Protocols h2 http/1.1 Protocols h2 http/1.1
SSLEngine On SSLEngine On
ServerName {{ gitea_basename }} ServerName {{ forgejo_basename }}
ServerAlias {{ gitea_basename }} ServerAlias {{ forgejo_basename }}
ProxyPreserveHost On ProxyPreserveHost On
ProxyRequests Off ProxyRequests Off
AllowEncodedSlashes NoDecode AllowEncodedSlashes NoDecode
@ -24,7 +24,7 @@
SSLHonorCipherOrder on SSLHonorCipherOrder on
SSLCipherSuite PROFILE=SYSTEM SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM SSLProxyCipherSuite PROFILE=SYSTEM
SSLCertificateFile /etc/pki/tls/certs/{{ gitea_basename }}.crt SSLCertificateFile /etc/pki/tls/certs/{{ forgejo_basename }}.crt
SSLCertificateKeyFile /etc/pki/tls/private/{{ gitea_basename }}.key SSLCertificateKeyFile /etc/pki/tls/private/{{ forgejo_basename }}.key
ServerAdmin {{ gitea_server_admin }} ServerAdmin {{ forgejo_server_admin }}
</VirtualHost> </VirtualHost>

View file

@ -1,12 +1,13 @@
--- ---
gitea_web_username: "{% if gitea_web_install == 'httpd' %}apache{% else %}{{ gitea_web_install }}{% endif %}" forgejo_web_username: "{% if forgejo_web_install == 'httpd' %}apache{% else %}{{ forgejo_web_install }}{% endif %}"
forgejo_packages: True
# Certs issued by FreeIPA Only # Certs issued by FreeIPA Only
ipa_getcert_requested_hostnames: ipa_getcert_requested_hostnames:
- name: "{{ ansible_fqdn }}" - name: "{{ ansible_fqdn }}"
owner: "{{ gitea_web_username }}" owner: "{{ forgejo_web_username }}"
key_location: "/etc/pki/tls/private/{{ gitea_basename }}.key" key_location: "/etc/pki/tls/private/{{ forgejo_basename }}.key"
cert_location: "/etc/pki/tls/certs/{{ gitea_basename }}.crt" cert_location: "/etc/pki/tls/certs/{{ forgejo_basename }}.crt"
postcmd: "/bin/systemctl reload httpd" postcmd: "/bin/systemctl reload httpd"
cnames: cnames:
- "{{ gitea_basename }}" - "{{ forgejo_basename }}"
... ...

View file

@ -1,10 +1,10 @@
--- ---
gitea_db: "{{ gitea_db_type|default('sqlite3') }}" forgejo_db: "{{ forgejo_db_type|default('sqlite3') }}"
gitea_db_user: "{{ gitea_db_username|default('gitea') }}" forgejo_db_user: "{{ forgejo_db_username|default('gitea') }}"
gitea_db_pass: "{{ gitea_db_password|default('') }}" forgejo_db_pass: "{{ forgejo_db_password|default('') }}"
gitea_db_host: "{{ gitea_db_host|default('127.0.0.1:3306') }}" forgejo_db_host: "{{ forgejo_db_host|default('127.0.0.1:3306') }}"
gitea_db_name: "{{ gitea_db_name|default('gitea') }}" forgejo_db_name: "{{ forgejo_db_name|default('gitea') }}"
gitea_db_ssl: "{{ gitea_db_ssl_mode|default('disable') }}" forgejo_db_ssl: "{{ forgejo_db_ssl_mode|default('disable') }}"
gitea_db_schema: "{{ gitea_db_schema_type|default('') }}" forgejo_db_schema: "{{ forgejo_db_schema_type|default('') }}"
gitea_db_path: "/var/lib/gitea/data/gitea.db" forgejo_db_path: "/var/lib/gitea/data/gitea.db"
... ...