Skip to content

Commit f12fdf8

Browse files
author
Jens Timmerman
authored
Merge pull request #1 from JensTimmerman/JensTimmerman-patch-1
set --work-path config parameter
2 parents 9326cd0 + b226af6 commit f12fdf8

31 files changed

+880
-251
lines changed

.ansible-lint

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"

.github/workflows/ansible-linting-check.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,22 @@
22
name: Ansible Lint check
33

44
# yamllint disable-line rule:truthy
5-
on:
6-
push:
7-
branches: '*'
8-
pull_request:
9-
branches: '*'
10-
schedule:
11-
- cron: '42 6 * */1 *'
5+
on: [push, pull_request]
126

137
jobs:
148
build:
15-
9+
name: Ansible Lint
1610
runs-on: ubuntu-latest
1711

1812
steps:
19-
- uses: actions/checkout@v2
13+
- name: 'checkout git repo'
14+
uses: actions/checkout@v3
15+
with:
16+
lfs: true
17+
submodules: false
18+
fetch-depth: 0
2019

21-
- name: Lint Ansible Playbook
22-
uses: ansible/ansible-lint-action@master
20+
- name: 'Lint Ansible Playbook'
21+
uses: ansible/ansible-lint-action@v6
2322
with:
24-
targets: "."
25-
# [required]
26-
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
27-
args: ""
28-
# [optional]
23+
path: "."

.github/workflows/galaxy.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: checkout
16-
uses: actions/checkout@v2
17-
- name: galaxy
18-
uses: robertdebock/[email protected]
15+
- name: 'checkout git repo'
16+
uses: actions/checkout@v3
17+
18+
- name: 'release on galaxy'
19+
uses: robertdebock/[email protected]
1920
with:
2021
galaxy_api_key: ${{ secrets.galaxy_api_key }}
22+
git_branch: 'main'

.github/workflows/yamllint.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ on:
77
branches: '*'
88
pull_request:
99
branches: '*'
10-
schedule:
11-
- cron: '23 6 * */1 *'
1210

1311
jobs:
1412
yamllint:
1513
name: 'Yamllint'
1614
runs-on: ubuntu-latest
1715
steps:
18-
- name: 'Checkout'
19-
uses: actions/checkout@master
16+
- name: 'checkout git repo'
17+
uses: actions/checkout@v3
18+
2019
- name: 'Yamllint'
21-
uses: karancode/yamllint-github-action@master
20+
uses: karancode/yamllint-github-action@v2.1.1
2221
with:
2322
yamllint_file_or_dir: '.'
2423
yamllint_config_filepath: './.yamllint'

.yamllint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
extends: default
33

44
rules:
5-
# 170 chars should be enough, but don't fail if a line is longer
5+
# 190 chars should be enough, but don't fail if a line is longer
66
line-length:
7-
max: 170
7+
max: 190
88
level: warning

README.md

Lines changed: 195 additions & 59 deletions
Large diffs are not rendered by default.

defaults/main.yml

Lines changed: 123 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
---
2+
# Choose between https://forgejo.org/ and https://gitea.io/
3+
gitea_fork: 'gitea' # 'gitea' and 'forgejo' are valid options
4+
25
# gitea version
36
# Use 'latest' to auto-update; upgrading past role version may lead to errors.
4-
gitea_version: '1.15.3'
7+
gitea_version: 'latest'
58
gitea_version_check: true
69
gitea_gpg_key: '7C9E68152594688862D62AF62D9AE806EC1592E2'
10+
gitea_forgejo_gpg_key: 'EB114F5E6C0DC2BCDD183550A4B61A2DC5923710'
711
gitea_gpg_server: 'hkps://keys.openpgp.org'
812
gitea_backup_on_upgrade: false
913
gitea_backup_location: "{{ gitea_home }}/backups/"
1014
submodules_versioncheck: false
1115

1216
# gitea in the linux world
1317
gitea_group: 'gitea'
18+
# gitea_groups: [] # Optional a list of groups user gitea will be added to
1419
gitea_home: '/var/lib/gitea'
20+
gitea_user_home: '{{ gitea_home }}'
21+
gitea_executable_path: '/usr/local/bin/gitea'
22+
gitea_forgejo_executable_path: '/usr/local/bin/forgejo'
23+
gitea_configuration_path: '/etc/gitea'
1524
gitea_shell: '/bin/false'
1625
gitea_systemd_cap_net_bind_service: false
1726

@@ -24,38 +33,91 @@ gitea_fqdn: 'localhost'
2433

2534
# Repository (repository)
2635
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#repository-repository
27-
gitea_repository_root: "{{ gitea_home }}/repos"
28-
gitea_force_private: false
29-
gitea_user_repo_limit: '-1'
30-
gitea_disable_http_git: false
3136
gitea_default_branch: 'main'
3237
gitea_default_private: 'last'
38+
gitea_default_repo_units: 'repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects'
39+
gitea_disabled_repo_units: ''
40+
gitea_disable_http_git: false
41+
gitea_disable_stars: false
42+
gitea_enable_push_create_org: false
43+
gitea_enable_push_create_user: false
44+
gitea_force_private: false
45+
gitea_user_repo_limit: '-1'
46+
gitea_repository_root: "{{ gitea_home }}/repos"
3347
gitea_repository_extra_config: ''
48+
49+
# Repository - Upload (repository.upload)
50+
# -> https://docs.gitea.io/en-us/administration/config-cheat-sheet/#repository---upload-repositoryupload
51+
gitea_repository_upload_enabled: true
52+
gitea_repository_upload_max_size: 4
3453
gitea_repository_upload_extra_config: ''
3554

55+
# Repository - Signing (repository.signing)
56+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#repository---signing-repositorysigning
57+
gitea_enable_repo_signing_options: false
58+
gitea_repo_signing_key: 'default'
59+
gitea_repo_signing_name: ''
60+
gitea_repo_signing_email: ''
61+
gitea_repo_initial_commit: 'always'
62+
gitea_repo_default_trust_model: 'collaborator'
63+
gitea_repo_wiki: 'never'
64+
gitea_repo_crud_actions: 'pubkey, twofa, parentsigned'
65+
gitea_repo_merges: ' pubkey, twofa, basesigned, commitssigned'
66+
gitea_enable_repo_signing_extra: ''
67+
68+
# CORS (cors)
69+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#cors-cors
70+
gitea_enable_cors: false
71+
gitea_cors_scheme: 'http'
72+
gitea_cors_allow_domain: '*'
73+
gitea_cors_allow_subdomain: false
74+
gitea_cors_methods: 'GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS'
75+
gitea_cors_max_age: '10m'
76+
gitea_cors_allow_credentials: false
77+
gitea_cors_headers: 'Content-Type,User-Agent'
78+
gitea_cors_x_frame_options: 'SAMEORIGIN'
79+
gitea_cors_extra: ''
80+
3681
# UI (ui)
3782
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui
3883
gitea_show_user_email: false
39-
gitea_theme_default: 'gitea'
40-
gitea_themes: 'gitea,arc-green'
84+
gitea_theme_default: 'auto'
85+
gitea_themes: 'auto,gitea,arc-green'
4186
gitea_ui_extra_config: ''
4287

88+
# UI - Metadata (ui.meta)
89+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#ui---metadata-uimeta
90+
gitea_ui_author: 'Gitea - Git with a cup of tea'
91+
gitea_ui_description: 'Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go:'
92+
gitea_ui_keywords: 'go,git,self-hosted,gitea,forgejo'
93+
gitea_ui_meta_extra_config: ''
94+
4395
# Server (server)
4496
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#server-server
4597
gitea_protocol: 'http'
4698
gitea_http_domain: "{{ gitea_fqdn }}"
4799
gitea_root_url: "http://{{ gitea_fqdn }}:3000"
48100
gitea_http_listen: '127.0.0.1'
49101
gitea_http_port: '3000'
50-
# gitea_http_letsencrypt_mail: '[email protected]'
51102
gitea_start_ssh: true
52103
gitea_ssh_domain: "{{ gitea_fqdn }}"
53104
gitea_ssh_port: '2222'
54105
gitea_ssh_listen: '0.0.0.0'
55106
gitea_offline_mode: true
107+
gitea_landing_page: 'home'
56108
gitea_lfs_server_enabled: false
57-
gitea_lfs_content_path: "{{ gitea_home }}/data/lfs"
58109
gitea_lfs_jwt_secret: ''
110+
gitea_redirect_other_port: false
111+
gitea_port_to_redirect: '80'
112+
gitea_enable_tls_certs: false
113+
gitea_tls_cert_file: 'https/cert.pem'
114+
gitea_tls_key_file: 'https/key.pem'
115+
gitea_enable_acme: false
116+
gitea_acme_url: ''
117+
gitea_acme_accepttos: false
118+
gitea_acme_directory: 'https'
119+
gitea_acme_email: ''
120+
gitea_acme_ca_root: ''
59121
gitea_server_extra_config: ''
60122

61123
# Database (database)
@@ -78,12 +140,14 @@ gitea_repo_indexer_exclude: ''
78140
gitea_repo_exclude_vendored: true
79141
gitea_repo_indexer_max_file_size: '1048576'
80142
gitea_indexer_extra_config: ''
143+
gitea_queue_issue_indexer_extra_config: ''
81144

82145
# Security (security)
83146
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#security-security
84147
gitea_secret_key: ''
85-
gitea_internal_token: ''
86148
gitea_disable_git_hooks: true
149+
gitea_disable_webhooks: false
150+
gitea_internal_token: ''
87151
gitea_password_check_pwn: false
88152
gitea_security_extra_config: ''
89153

@@ -103,14 +167,19 @@ gitea_service_extra_config: ''
103167
# Mailer [mailer]
104168
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#mailer-mailer
105169
gitea_mailer_enabled: false
106-
gitea_mailer_host: 'localhost:25'
107-
gitea_mailer_skip_verify: false
108-
gitea_mailer_tls_enabled: true
109-
gitea_mailer_from: "noreply@{{ gitea_http_domain }}"
170+
gitea_mailer_protocol: 'dummy'
171+
gitea_mailer_smtp_addr: ''
172+
gitea_mailer_smtp_port: ''
173+
gitea_mailer_use_client_cert: false
174+
gitea_mailer_client_cert_file: ''
175+
gitea_mailer_client_key_file: ''
176+
gitea_mailer_force_trust_server_cert: false
110177
gitea_mailer_user: ''
111178
gitea_mailer_password: ''
179+
gitea_mailer_enable_helo: true
180+
gitea_mailer_from: "noreply@{{ gitea_http_domain }}"
112181
gitea_subject_prefix: ''
113-
gitea_mailer_type: smtp
182+
gitea_mailer_send_as_plaintext: false
114183
gitea_mailer_extra_config: ''
115184

116185
# Session (session)
@@ -119,27 +188,65 @@ gitea_session_provider: 'file'
119188
gitea_session_extra_config: ''
120189

121190
# Picture (picture)
122-
gitea_disable_gravatar: true
191+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#picture-picture
123192
gitea_picture_extra_config: ''
124193

125194
# Issue and pull request attachments (attachment)
195+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#issue-and-pull-request-attachments-attachment
126196
gitea_attachment_enabled: true
197+
gitea_attachment_types: '.csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip'
198+
gitea_attachment_max_size: 4
127199
gitea_attachment_extra_config: ''
128200

129201
# Log (log)
202+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#log-log
130203
gitea_log_systemd: false
131204
gitea_log_level: 'Warn'
132205
gitea_log_extra_config: ''
133206

134207
# Metrics (metrics)
208+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#metrics-metrics
135209
gitea_metrics_enabled: false
136210
gitea_metrics_token: ''
211+
gitea_metrics_extra: ''
137212

138213
# OAuth2 (oauth2)
214+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#oauth2-oauth2
139215
gitea_oauth2_enabled: true
140216
gitea_oauth2_jwt_secret: ''
141217
gitea_oauth2_extra_config: ''
142218

219+
# Federation (federation)
220+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#federation-federation
221+
gitea_federation_enabled: false
222+
gitea_federation_share_user_stats: false
223+
gitea_federation_extra: ''
224+
225+
# Packages (packages)
226+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#packages-packages
227+
gitea_packages_enabled: true
228+
gitea_packages_extra: ''
229+
230+
# LFS (lfs)
231+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#lfs-lfs
232+
gitea_lfs_storage_type: 'local'
233+
gitea_lfs_serve_direct: false
234+
gitea_lfs_content_path: "{{ gitea_home }}/data/lfs"
235+
gitea_lfs_extra: ''
236+
237+
# Actions (actions)
238+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions
239+
gitea_actions_enabled: false
240+
gitea_actions_default_actions_url: "https://gitea.com"
241+
gitea_actions_extra: ''
242+
243+
# Other (other)
244+
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#other-other
245+
gitea_other_show_footer_version: true
246+
gitea_other_show_footer_template_load_time: true
247+
gitea_other_enable_sitemap: true
248+
gitea_other_enable_feed: true
249+
143250
# additional gitea config
144251
gitea_extra_config: ""
145252

handlers/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
- name: "Restart gitea"
33
become: true
4-
service:
4+
ansible.builtin.service:
55
name: gitea
66
state: restarted
77
when: ansible_service_mgr == "systemd"
88

99
- name: "Reload systemd"
1010
become: true
11-
systemd:
11+
ansible.builtin.systemd:
1212
daemon_reload: true
1313
when: ansible_service_mgr == "systemd"
1414

15-
- name: "systemctl restart fail2ban"
15+
- name: "Systemctl restart fail2ban"
1616
become: true
1717
ansible.builtin.systemd:
1818
name: fail2ban

0 commit comments

Comments
 (0)