Move the LFS configuration in a dedicated task.

This commit is contained in:
Andrea Dell'Amico 2024-04-28 16:12:16 +02:00
parent ff5ce5467a
commit afed82bf44
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 18 additions and 3 deletions

View File

@ -48,6 +48,11 @@ gitea_start_lfs: 'true'
gitea_lfs_content_path: '{{ gitea_data_dir }}/data/lfs' gitea_lfs_content_path: '{{ gitea_data_dir }}/data/lfs'
#gitea_lfs_jwt_secret: put it into a vault file #gitea_lfs_jwt_secret: put it into a vault file
gitea_lfs_http_auth_expiry: 20m gitea_lfs_http_auth_expiry: 20m
gitea_lfs_configuration:
- { section: 'server', option: 'LFS_START_SERVER', value: '{{ gitea_start_lfs }}', state: 'present' }
- { section: 'server', option: 'LFS_HTTP_AUTH_EXPIRY', value: '{{ gitea_lfs_http_auth_expiry }}', state: 'present' }
- { section: 'server', option: 'LFS_CONTENT_PATH', value: '{{ gitea_lfs_content_path }}', state: 'absent' }
- { section: 'lfs', option: 'PATH', value: '{{ gitea_lfs_content_path }}', state: 'present' }
gitea_required_packages: gitea_required_packages:
- git - git

View File

@ -157,6 +157,19 @@
when: gitea_enable_repository_archives_cron_jobs when: gitea_enable_repository_archives_cron_jobs
notify: Restart gitea notify: Restart gitea
- name: gitea | LFS configuration
community.general.ini_file:
path: '{{ gitea_conf_dir }}/app.ini'
section: '{{ item.section }}'
option: '{{ item.option }}'
value: '{{ item.value }}'
state: '{{ item.state }}'
owner: '{{ gitea_user }}'
group: '{{ gitea_group }}'
mode: '0640'
create: false
loop: '{{ gitea_lfs_configuration }}'
notify: Restart gitea
- name: gitea | Gitea systemd service - name: gitea | Gitea systemd service
tags: ['git', 'gitea', 'gitea_service'] tags: ['git', 'gitea', 'gitea_service']

View File

@ -11,9 +11,6 @@ MAX_CREATION_LIMIT = {{ gitea_max_repository_per_user }}
PROTOCOL = {{ gitea_server_protocol }} PROTOCOL = {{ gitea_server_protocol }}
HTTP_ADDR = {{ gitea_http_addr }} HTTP_ADDR = {{ gitea_http_addr }}
LANDING_PAGE = {{ gitea_landing_page }} LANDING_PAGE = {{ gitea_landing_page }}
LFS_START_SERVER = {{ gitea_start_lfs }}
LFS_CONTENT_PATH = {{ gitea_lfs_content_path }}
LFS_HTTP_AUTH_EXPIRY = {{ gitea_lfs_http_auth_expiry }}
SSH_DOMAIN = {{ gitea_hostname }} SSH_DOMAIN = {{ gitea_hostname }}
DOMAIN = {{ gitea_hostname }} DOMAIN = {{ gitea_hostname }}
HTTP_PORT = {{ gitea_http_port }} HTTP_PORT = {{ gitea_http_port }}