Adjust based on test run
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
# Defaults
|
||||
# Set adjustments in another group vars file or via extra vars
|
||||
forgejo_version: "9.0.3"
|
||||
forgejo_arch: "amd64"
|
||||
forgejo_web_install: "httpd"
|
||||
|
@ -24,6 +25,9 @@ forgejo_directory_list:
|
|||
- "/var/lib/forgejo/custom"
|
||||
- "/var/lib/forgejo/custom/https"
|
||||
- "/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/log"
|
||||
...
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
# Handlers
|
||||
- name: restart_gitea
|
||||
- name: restart_forgejo
|
||||
service:
|
||||
name: gitea
|
||||
name: forgejo
|
||||
state: restarted
|
||||
|
||||
- name: restart_httpd
|
||||
|
|
1
hosts
Normal file
|
@ -0,0 +1 @@
|
|||
idp.angelsofclockwork.net
|
|
@ -8,6 +8,9 @@
|
|||
- "vars/common.yml"
|
||||
- "vars/db.yml"
|
||||
|
||||
handlers:
|
||||
- import_tasks: handlers/main.yml
|
||||
|
||||
pre_tasks:
|
||||
- name: Check if ansible cannot be run here
|
||||
stat:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- name: "Get Forgejo binary"
|
||||
ansible.builtin.get_url:
|
||||
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 }}"
|
||||
mode: "0755"
|
||||
register: forgejo_content
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
logins:
|
||||
- name: "{{ gitea_basename }}"
|
||||
url: "https://{{ gitea_basename }}"
|
||||
token: "{{ gitea_token }}"
|
||||
- name: "{{ forgejo_basename }}"
|
||||
url: "https://{{ forgejo_basename }}"
|
||||
token: "{{ forgejo_token }}"
|
||||
default: true
|
||||
insecure: false
|
||||
user: "{{ gitea_automation_user }}"
|
||||
user: "{{ forgejo_automation_user }}"
|
||||
created: 1644820631
|
||||
|
|
|
@ -4,13 +4,14 @@ RUN_MODE = prod
|
|||
WORK_PATH = /var/lib/forgejo
|
||||
|
||||
[database]
|
||||
DB_TYPE = postgres
|
||||
HOST = {{ forgejo_database_host }}
|
||||
NAME = {{ forgejo_database_name }}
|
||||
USER = {{ forgejo_database_user }}
|
||||
PASSWD = {{ forgejo_database_pass }}
|
||||
DB_TYPE = sqlite
|
||||
HOST = {{ forgejo_database_host|default('127.0.0.1:3306') }}
|
||||
NAME = {{ forgejo_database_name|default('forgejo') }}
|
||||
USER = {{ forgejo_database_user|default('forgejo') }}
|
||||
PASSWD = {{ forgejo_database_pass|default('') }}
|
||||
SCHEMA =
|
||||
SSL_MODE = {{ forgejo_database_ssl|default('disabled') }}
|
||||
PATH = /var/lib/gitea/data/gitea.db
|
||||
CHARSET = utf8
|
||||
LOG_SQL = false
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName {{ gitea_basename }}
|
||||
ServerAlias {{ gitea_basename }}
|
||||
ServerName {{ forgejo_basename }}
|
||||
ServerAlias {{ forgejo_basename }}
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests Off
|
||||
AllowEncodedSlashes NoDecode
|
||||
ProxyPass / http://localhost:3000/ nocanon
|
||||
ProxyPassReverse / http://localhost:3000/ nocanon
|
||||
ServerAdmin {{ gitea_server_admin }}
|
||||
ServerAdmin {{ forgejo_server_admin }}
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
Protocols h2 http/1.1
|
||||
SSLEngine On
|
||||
ServerName {{ gitea_basename }}
|
||||
ServerAlias {{ gitea_basename }}
|
||||
ServerName {{ forgejo_basename }}
|
||||
ServerAlias {{ forgejo_basename }}
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests Off
|
||||
AllowEncodedSlashes NoDecode
|
||||
|
@ -24,7 +24,7 @@
|
|||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite PROFILE=SYSTEM
|
||||
SSLProxyCipherSuite PROFILE=SYSTEM
|
||||
SSLCertificateFile /etc/pki/tls/certs/{{ gitea_basename }}.crt
|
||||
SSLCertificateKeyFile /etc/pki/tls/private/{{ gitea_basename }}.key
|
||||
ServerAdmin {{ gitea_server_admin }}
|
||||
SSLCertificateFile /etc/pki/tls/certs/{{ forgejo_basename }}.crt
|
||||
SSLCertificateKeyFile /etc/pki/tls/private/{{ forgejo_basename }}.key
|
||||
ServerAdmin {{ forgejo_server_admin }}
|
||||
</VirtualHost>
|
|
@ -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
|
||||
ipa_getcert_requested_hostnames:
|
||||
- name: "{{ ansible_fqdn }}"
|
||||
owner: "{{ gitea_web_username }}"
|
||||
key_location: "/etc/pki/tls/private/{{ gitea_basename }}.key"
|
||||
cert_location: "/etc/pki/tls/certs/{{ gitea_basename }}.crt"
|
||||
owner: "{{ forgejo_web_username }}"
|
||||
key_location: "/etc/pki/tls/private/{{ forgejo_basename }}.key"
|
||||
cert_location: "/etc/pki/tls/certs/{{ forgejo_basename }}.crt"
|
||||
postcmd: "/bin/systemctl reload httpd"
|
||||
cnames:
|
||||
- "{{ gitea_basename }}"
|
||||
- "{{ forgejo_basename }}"
|
||||
...
|
||||
|
|
16
vars/db.yml
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
gitea_db: "{{ gitea_db_type|default('sqlite3') }}"
|
||||
gitea_db_user: "{{ gitea_db_username|default('gitea') }}"
|
||||
gitea_db_pass: "{{ gitea_db_password|default('') }}"
|
||||
gitea_db_host: "{{ gitea_db_host|default('127.0.0.1:3306') }}"
|
||||
gitea_db_name: "{{ gitea_db_name|default('gitea') }}"
|
||||
gitea_db_ssl: "{{ gitea_db_ssl_mode|default('disable') }}"
|
||||
gitea_db_schema: "{{ gitea_db_schema_type|default('') }}"
|
||||
gitea_db_path: "/var/lib/gitea/data/gitea.db"
|
||||
forgejo_db: "{{ forgejo_db_type|default('sqlite3') }}"
|
||||
forgejo_db_user: "{{ forgejo_db_username|default('gitea') }}"
|
||||
forgejo_db_pass: "{{ forgejo_db_password|default('') }}"
|
||||
forgejo_db_host: "{{ forgejo_db_host|default('127.0.0.1:3306') }}"
|
||||
forgejo_db_name: "{{ forgejo_db_name|default('gitea') }}"
|
||||
forgejo_db_ssl: "{{ forgejo_db_ssl_mode|default('disable') }}"
|
||||
forgejo_db_schema: "{{ forgejo_db_schema_type|default('') }}"
|
||||
forgejo_db_path: "/var/lib/gitea/data/gitea.db"
|
||||
...
|
||||
|
|