nofiles limit is now a variable.

This commit is contained in:
Andrea Dell'Amico 2024-01-05 18:49:42 +01:00
parent eefd2438a4
commit 80de76635f
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 19 additions and 15 deletions

View File

@ -34,6 +34,8 @@ gitea_create_service_user: True
gitea_user: gitea
gitea_group: '{{ gitea_user }}'
gitea_run_mode: prod
gitea_limit_nofile: 16384
gitea_limit_nofile_soft: 4096
gitea_db: postgres
gitea_local_postgresql: True
gitea_local_mysql: False

View File

@ -111,16 +111,19 @@
- 'public/css'
- 'public/components'
tags: [ 'git', 'gitea', 'gitea_conf' ]
- name: Install the gitea systemd unit
template: src=gitea.service.systemd.j2 dest=/etc/systemd/system/gitea.service
register: gitea_systemd_unit
- name: Reload the systemd configuration
command: systemctl daemon-reload
when: gitea_systemd_unit is changed
- name: Ensure that the gitea service is running and enabled
service: name=gitea state=started enabled=yes
tags: [ 'git', 'gitea' ]
- name: Gitea systemd service
tags: ['git', 'gitea', 'gitea_service']
block:
- name: Install the gitea systemd unit
template: src=gitea.service.systemd.j2 dest=/etc/systemd/system/gitea.service
register: gitea_systemd_unit
- name: Reload the systemd configuration
command: systemctl daemon-reload
when: gitea_systemd_unit is changed
- name: Ensure that the gitea service is running and enabled
service: name=gitea state=started enabled=yes

View File

@ -22,9 +22,8 @@ Requires=memcached.service
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
LimitNOFILE=8192
LimitNOFILESoft=1024
LimitNOFILE={{ gitea_limit_nofile }}
LimitNOFILESoft={{ gitea_limit_nofile_soft }}
RestartSec=2s
Type=simple
User={{ gitea_user }}