Compare commits
12 Commits
tpiccioli-
...
master
Author | SHA1 | Date |
---|---|---|
|
99690f5790 | |
|
0f821d89bc | |
|
fbcc560820 | |
|
655394009e | |
|
07062187d0 | |
|
afed82bf44 | |
|
ff5ce5467a | |
|
d3f0dd393c | |
|
65a44ffc32 | |
|
36fd443b9c | |
|
80de76635f | |
|
eefd2438a4 |
14
README.md
14
README.md
|
@ -9,13 +9,13 @@ Role Variables
|
|||
The most important variables are listed below:
|
||||
|
||||
``` yaml
|
||||
gitea_version: 1.14.3
|
||||
gitea_local_postgresql: True
|
||||
gitea_local_mysql: False
|
||||
gitea_local_mariadb: False
|
||||
gitea_nginx_frontend: True
|
||||
gitea_local_redis: True
|
||||
gitea_local_memcache: True
|
||||
gitea_version: 1.21.11
|
||||
gitea_local_postgresql: true
|
||||
gitea_local_mysql: false
|
||||
gitea_local_mariadb: false
|
||||
gitea_nginx_frontend: true
|
||||
gitea_local_redis: true
|
||||
gitea_local_memcache: true
|
||||
gitea_app_configurations:
|
||||
- { section: 'mailer', option: 'ENABLED', value: 'true', state: 'present' }
|
||||
- { section: 'mailer', option: 'FROM', value: '{{ gitea_mail_from }}', state: 'present' }
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# We use the server ssh daemon, and nginx in front of the service by default.
|
||||
# So we do not start in http mode and we do not use the embedded letsencrypt support
|
||||
#
|
||||
gitea_version: 1.19.4
|
||||
gitea_version: 1.21.11
|
||||
gitea_download_url: 'https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64'
|
||||
gitea_force_binary_download: False
|
||||
gitea_bin_path: /usr/local/bin/gitea
|
||||
|
@ -22,7 +22,7 @@ gitea_socket_dir: /run/gitea
|
|||
gitea_repository_data: '{{ gitea_data_dir }}/repositories'
|
||||
gitea_max_repository_per_user: 200
|
||||
|
||||
gitea_server_protocol: unix
|
||||
gitea_server_protocol: "http+unix"
|
||||
gitea_hostname: '{{ ansible_fqdn }}'
|
||||
gitea_http_addr: '{{ gitea_socket_dir }}/gitea.sock'
|
||||
gitea_http_port: 3000
|
||||
|
@ -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
|
||||
|
@ -46,6 +48,11 @@ gitea_start_lfs: 'true'
|
|||
gitea_lfs_content_path: '{{ gitea_data_dir }}/data/lfs'
|
||||
#gitea_lfs_jwt_secret: put it into a vault file
|
||||
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:
|
||||
- git
|
||||
|
@ -53,11 +60,11 @@ gitea_required_packages:
|
|||
gitea_db_name: gitea
|
||||
gitea_db_user: gitea_u
|
||||
#gitea_db_pwd: put it into a vault file
|
||||
gitea_db_host: postgres.priv.isti.cnr.it
|
||||
gitea_db_host: "localhost"
|
||||
gitea_db_port: 5432
|
||||
gitea_db_ssl_mode: 'disable'
|
||||
|
||||
gitea_app_name: "Gitea"
|
||||
gitea_app_name: "Gitea git server"
|
||||
gitea_disable_registration: 'false'
|
||||
gitea_install_lock: 'false'
|
||||
gitea_mailer_enabled: False
|
||||
|
@ -137,8 +144,8 @@ gitea_app_configurations:
|
|||
- { section: 'log', option: 'COLORIZE', value: 'false', state: 'present' }
|
||||
- { section: 'log', option: 'LEVEL', value: '{{ gitea_log_level }}', state: 'present' }
|
||||
- { section: 'log', option: 'FILE_NAME', value: '{{ gitea_log_dir }}/gitea.log', state: 'present' }
|
||||
- { section: 'log', option: 'ENABLE_XORM_LOG', value: 'true', state: 'present' }
|
||||
- { section: 'log', option: 'ENABLE_ACCESS_LOG', value: 'true', state: 'present' }
|
||||
- { section: 'log', option: 'ENABLE_XORM_LOG', value: 'true', state: 'absent' }
|
||||
- { section: 'log', option: 'ENABLE_ACCESS_LOG', value: 'true', state: 'absent' }
|
||||
- { section: 'log.sublogger.router', option: 'FILE_NAME', value: '{{ gitea_log_dir }}/router.log', state: 'present' }
|
||||
- { section: 'log.sublogger.access', option: 'FILE_NAME', value: '{{ gitea_log_dir }}/access.log', state: 'present' }
|
||||
- { section: 'log.sublogger.xorm', option: 'FILE_NAME', value: '{{ gitea_log_dir }}/xorm.log', state: 'present' }
|
||||
|
@ -148,7 +155,20 @@ gitea_app_configurations:
|
|||
- { section: 'session', option: 'COOKIE_SECURE', value: 'false', state: 'present'}
|
||||
# - { section: 'mailer', option: 'ENABLED', value: 'true', state: 'present' }
|
||||
# - { section: 'mailer', option: 'FROM', value: '{{ gitea_mail_from }}', state: 'present' }
|
||||
# - { section: 'mailer', option: 'MAILER_TYPE', value: '{{ gitea_mailer_type }}', state: 'present' }
|
||||
# - { section: 'mailer', option: 'MAILER_PROTOCOL', value: '{{ gitea_mailer_type }}', state: 'present' }
|
||||
# - { section: 'mailer', option: 'SENDMAIL_PATH', value: '{{ gitea_sendmail_path }}', state: 'present' }
|
||||
# - { section: 'metrics', option: 'ENABLED', value: 'true', state: 'present' }
|
||||
# - { section: 'metrics', option: 'TOKEN', value: '{{ gitea_prometheus_bearer_token }}', state: 'present' }
|
||||
|
||||
gitea_enable_repository_archives_cron_jobs: true
|
||||
gitea_delete_repo_archives_frequency: "@weekly"
|
||||
gitea_rep_archives_configuration:
|
||||
- { section: 'cron.archive_cleanup', option: 'ENABLED', value: 'true', state: 'present' }
|
||||
- { section: 'cron.archive_cleanup', option: 'RUN_AT_START', value: 'false', state: 'present' }
|
||||
- { section: 'cron.archive_cleanup', option: 'NOTICE_ON_SUCCESS', value: 'false', state: 'present' }
|
||||
- { section: 'cron.archive_cleanup', option: 'SCHEDULE', value: '@midnight', state: 'present' }
|
||||
- { section: 'cron.archive_cleanup', option: 'OLDER_THAN', value: '24h', state: 'present' }
|
||||
- { section: 'cron.delete_repo_archives', option: 'ENABLED', value: 'true', state: 'present' }
|
||||
- { section: 'cron.delete_repo_archives', option: 'RUN_AT_START', value: 'false', state: 'present' }
|
||||
- { section: 'cron.delete_repo_archives', option: 'NOTICE_ON_SUCCESS', value: 'false', state: 'present' }
|
||||
- { section: 'cron.delete_repo_archives', option: 'SCHEDULE', value: '{{ gitea_delete_repo_archives_frequency }}', state: 'present' }
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<!-- lets import the less stylesheet {{AppSubUrl}} is a variable that gitea will autofill -->
|
||||
<link rel="stylesheet" type="text/css" href="{{AppSubUrl}}/css/jupyter.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{AppSubUrl}}/assets/css/jupyter.css" />
|
||||
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
---
|
||||
- name: reload gitea
|
||||
service: name=gitea state=reloaded
|
||||
- name: Reload gitea
|
||||
ansible.builtin.service:
|
||||
name: gitea
|
||||
state: reloaded
|
||||
|
||||
- name: restart gitea
|
||||
service: name=gitea state=restarted
|
||||
- name: Restart gitea
|
||||
ansible.builtin.service:
|
||||
name: gitea
|
||||
state: restarted
|
||||
|
||||
- name: Reload the systemd configuration
|
||||
ansible.builtin.systemd_service:
|
||||
daemon-reload: true
|
||||
|
|
|
@ -7,7 +7,7 @@ galaxy_info:
|
|||
|
||||
license: EUPL 1.2+
|
||||
|
||||
min_ansible_version: "2.8"
|
||||
min_ansible_version: "2.9"
|
||||
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
|
|
281
tasks/gitea.yml
281
tasks/gitea.yml
|
@ -1,126 +1,191 @@
|
|||
---
|
||||
- block:
|
||||
- name: Create the gitea service user
|
||||
user: name={{ gitea_user }} home=/srv/gitea createhome=yes shell=/bin/bash system=yes
|
||||
when: gitea_create_service_user
|
||||
- name: gitea | Manage the gitea installation and configuration
|
||||
tags: ['git', 'gitea']
|
||||
block:
|
||||
- name: gitea | Create the gitea service user
|
||||
ansible.builtin.user:
|
||||
name: "{{ gitea_user }}"
|
||||
home: /srv/gitea
|
||||
createhome: true
|
||||
shell: /bin/bash
|
||||
system: true
|
||||
when: gitea_create_service_user
|
||||
|
||||
- name: Create the gitea directory tree
|
||||
file: dest={{ gitea_data_dir }}/{{ item }} state=directory owner={{ gitea_user }} group={{ gitea_group }}
|
||||
with_items: '{{ gitea_data_subdirs }}'
|
||||
when: gitea_create_service_user
|
||||
- name: gitea | Create the gitea directory tree
|
||||
ansible.builtin.file:
|
||||
dest: "{{ gitea_data_dir }}/{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ gitea_user }}"
|
||||
group: "{{ gitea_group }}"
|
||||
mode: "0750"
|
||||
loop: '{{ gitea_data_subdirs }}'
|
||||
when: gitea_create_service_user
|
||||
|
||||
- name: Create the gitea subdirs when we are using a pre existing user
|
||||
become: True
|
||||
become_user: '{{ gitea_user }}'
|
||||
file: dest={{ gitea_data_dir }}/{{ item }} state=directory
|
||||
with_items: '{{ gitea_data_subdirs }}'
|
||||
when: not gitea_create_service_user
|
||||
- name: gitea | Create the gitea subdirs when we are using a pre existing user
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
ansible.builtin.file:
|
||||
dest: "{{ gitea_data_dir }}/{{ item }}"
|
||||
state: directory
|
||||
mode: "0750"
|
||||
with_items: '{{ gitea_data_subdirs }}'
|
||||
when: not gitea_create_service_user
|
||||
|
||||
- name: Create the gitea conf directory
|
||||
file: dest={{ gitea_conf_dir }} state=directory owner=root group={{ gitea_group }} mode=0750
|
||||
- name: gitea | Create the gitea conf directory
|
||||
ansible.builtin.file:
|
||||
dest: "{{ gitea_conf_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: "{{ gitea_group }}"
|
||||
mode: "0750"
|
||||
|
||||
- name: Create the gitea socket directory
|
||||
file:
|
||||
dest: '{{ gitea_socket_dir }}'
|
||||
state: directory
|
||||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: 0755
|
||||
- name: gitea | Create the gitea socket directory
|
||||
ansible.builtin.file:
|
||||
dest: '{{ gitea_socket_dir }}'
|
||||
state: directory
|
||||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: "0755"
|
||||
|
||||
- name: Create the gitea log directory
|
||||
file:
|
||||
dest: '{{ gitea_log_dir }}'
|
||||
state: directory
|
||||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: 0755
|
||||
- name: gitea | Create the gitea log directory
|
||||
ansible.builtin.file:
|
||||
dest: '{{ gitea_log_dir }}'
|
||||
state: directory
|
||||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: "0755"
|
||||
|
||||
- name: Download the gitea binary
|
||||
get_url:
|
||||
url: '{{ gitea_download_url }}'
|
||||
dest: '{{ gitea_bin_path }}'
|
||||
owner: root
|
||||
group: '{{ gitea_group }}'
|
||||
mode: 0750
|
||||
notify: restart gitea
|
||||
- name: gitea | Download the gitea binary
|
||||
ansible.builtin.get_url:
|
||||
url: '{{ gitea_download_url }}'
|
||||
dest: '{{ gitea_bin_path }}'
|
||||
owner: root
|
||||
group: '{{ gitea_group }}'
|
||||
mode: "0750"
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Force the download of the gitea binary to upgrade it
|
||||
get_url:
|
||||
url: '{{ gitea_download_url }}'
|
||||
dest: '{{ gitea_bin_path }}'
|
||||
owner: root
|
||||
group: '{{ gitea_group }}'
|
||||
mode: 0750
|
||||
force: true
|
||||
when: gitea_force_binary_download
|
||||
- name: gitea | Force the download of the gitea binary to upgrade it
|
||||
ansible.builtin.get_url:
|
||||
url: '{{ gitea_download_url }}'
|
||||
dest: '{{ gitea_bin_path }}'
|
||||
owner: root
|
||||
group: '{{ gitea_group }}'
|
||||
mode: "0750"
|
||||
force: true
|
||||
when: gitea_force_binary_download
|
||||
|
||||
- name: Install the required packages
|
||||
package: state=present use=auto name={{ gitea_required_packages }}
|
||||
- name: gitea | Install the required packages
|
||||
ansible.builtin.package:
|
||||
state: present
|
||||
use: auto
|
||||
name: "{{ gitea_required_packages }}"
|
||||
|
||||
- name: Install the gitea configuration file. At install time only
|
||||
template: src=app.ini.j2 dest={{ gitea_conf_dir }}/app.ini owner={{ gitea_user }} group={{ gitea_group }} mode=0640 force=no
|
||||
notify: restart gitea
|
||||
- name: gitea | Install the gitea configuration file. At install time only
|
||||
ansible.builtin.template:
|
||||
src: app.ini.j2
|
||||
dest: "{{ gitea_conf_dir }}/app.ini"
|
||||
owner: "{{ gitea_user }}"
|
||||
group: "{{ gitea_group }}"
|
||||
mode: "0640"
|
||||
force: false
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Change the gitea configuration. After the installation
|
||||
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: no
|
||||
loop: '{{ gitea_app_configurations }}'
|
||||
when: gitea_app_configurations is defined
|
||||
notify: restart gitea
|
||||
tags: [ 'git', 'gitea', 'gitea_conf' ]
|
||||
- name: gitea | Manage the gitea configuration settings
|
||||
tags: [git, gitea, gitea_conf]
|
||||
block:
|
||||
- name: gitea | Create the tmpfile entry for the gitea socket directory
|
||||
ansible.builtin.template:
|
||||
src: tmpfile_gitea.conf.j2
|
||||
dest: /usr/lib/tmpfiles.d/gitea.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Prometheus metrics
|
||||
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: no
|
||||
loop: '{{ gitea_prometheus_conf }}'
|
||||
notify: restart gitea
|
||||
tags: [ 'git', 'gitea', 'gitea_conf' ]
|
||||
- name: gitea | Create some custom subdirectories
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
ansible.builtin.file:
|
||||
dest: '{{ gitea_data_dir }}/custom/{{ item }}'
|
||||
state: directory
|
||||
mode: "0750"
|
||||
loop:
|
||||
- 'templates/custom'
|
||||
- 'public/assets/css'
|
||||
- 'public/assets/components'
|
||||
|
||||
- name: Create the tmpfile entry for the gitea socket directory
|
||||
template:
|
||||
src: tmpfile_gitea.conf.j2
|
||||
dest: /usr/lib/tmpfiles.d/gitea.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
- name: gitea | Change the gitea configuration. After the installation
|
||||
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_app_configurations }}'
|
||||
when: gitea_app_configurations is defined
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Create some custom subdirectories
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
file:
|
||||
dest: '{{ gitea_data_dir }}/custom/{{ item }}'
|
||||
state: directory
|
||||
loop:
|
||||
- 'templates/custom'
|
||||
- 'public/css'
|
||||
- 'public/components'
|
||||
tags: [ 'git', 'gitea', 'gitea_conf' ]
|
||||
- name: gitea | Prometheus metrics
|
||||
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_prometheus_conf }}'
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Install the gitea systemd unit
|
||||
template: src=gitea.service.systemd.j2 dest=/etc/systemd/system/gitea.service
|
||||
register: gitea_systemd_unit
|
||||
- name: gitea | Configure some repository archives cron jobs
|
||||
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_rep_archives_configuration }}'
|
||||
when: gitea_enable_repository_archives_cron_jobs
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Reload the systemd configuration
|
||||
command: systemctl daemon-reload
|
||||
when: gitea_systemd_unit is changed
|
||||
- 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: Ensure that the gitea service is running and enabled
|
||||
service: name=gitea state=started enabled=yes
|
||||
- name: gitea | Gitea systemd service
|
||||
tags: ['git', 'gitea', 'gitea_service']
|
||||
block:
|
||||
- name: gitea | Install the gitea systemd unit
|
||||
ansible.builtin.template:
|
||||
src: gitea.service.systemd.j2
|
||||
dest: /etc/systemd/system/gitea.service
|
||||
mode: "0644"
|
||||
notify: Reload the systemd configuration
|
||||
|
||||
tags: [ 'git', 'gitea' ]
|
||||
- name: gitea | Flush the handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: gitea | Ensure that the gitea service is running and enabled
|
||||
ansible.builtin.service:
|
||||
name: gitea
|
||||
state: started
|
||||
enabled: true
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
- name: Global renderers config
|
||||
- name: renderers | Global renderers config
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_renderers']
|
||||
block:
|
||||
- name: Global renderers config
|
||||
ini_file:
|
||||
- name: renderers | Global renderers config
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -11,17 +12,16 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_renderers_global_conf }}'
|
||||
when: gitea_install_viewer_addons
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_renderers' ]
|
||||
|
||||
- name: Configure asciidoc
|
||||
- name: renderers | Configure asciidoc
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_asciidoc']
|
||||
block:
|
||||
- name: Configure asciidoc
|
||||
ini_file:
|
||||
- name: renderers | Configure asciidoc
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -30,17 +30,16 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_markup_asciidoc_conf }}'
|
||||
when: gitea_install_viewer_addons
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_asciidoc' ]
|
||||
|
||||
- name: Configure jupyter markup
|
||||
- name: renderers | Configure jupyter markup
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_jupyter']
|
||||
block:
|
||||
- name: Configure jupyter markup
|
||||
ini_file:
|
||||
- name: renderers | Configure jupyter markup
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -49,47 +48,46 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_markup_jupyter_conf }}'
|
||||
when: gitea_install_viewer_addons
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Install the jupyter CSS
|
||||
- name: renderers | Install the jupyter CSS
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: jupyter.css
|
||||
dest: '{{ gitea_data_dir }}/custom/public/css/jupyter.css'
|
||||
mode: 0444
|
||||
dest: '{{ gitea_data_dir }}/custom/public/assets/css/jupyter.css'
|
||||
mode: "0444"
|
||||
|
||||
- name: Install html template that loads the CSS
|
||||
- name: renderers | Install html template that loads the CSS
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: header.tmpl
|
||||
dest: '{{ gitea_data_dir }}/custom/templates/custom/header.tmpl'
|
||||
mode: 0444
|
||||
mode: "0444"
|
||||
|
||||
- name: Check if the awesome fonts are installed
|
||||
stat:
|
||||
- name: renderers | Check if the awesome fonts are installed
|
||||
ansible.builtin.stat:
|
||||
path: /usr/share/fonts-font-awesome
|
||||
register: awesome_fonts_dir
|
||||
|
||||
- name: Link to the awesome fonts directory
|
||||
- name: renderers | Link to the awesome fonts directory
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
src: /usr/share/fonts-font-awesome
|
||||
dest: '{{ gitea_data_dir }}/custom/public/components/font-awesome'
|
||||
dest: '{{ gitea_data_dir }}/custom/public/assets/components/font-awesome'
|
||||
state: link
|
||||
when: awesome_fonts_dir.stat.exists
|
||||
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_jupyter' ]
|
||||
|
||||
- name: Configure restructuredtext markup
|
||||
- name: renderers | Configure restructuredtext markup
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_restructuredtext']
|
||||
block:
|
||||
- name: Configure restructuredtext markup
|
||||
ini_file:
|
||||
- name: renderers | Configure restructuredtext markup
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -98,17 +96,16 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_markup_restructuredtext_conf }}'
|
||||
when: gitea_install_viewer_addons
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_restructuredtext' ]
|
||||
|
||||
- name: Configure sanitizer TeX markup
|
||||
- name: renderers | Configure sanitizer TeX markup
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_sanitizer_tex']
|
||||
block:
|
||||
- name: Configure sanitizer TeX markup
|
||||
ini_file:
|
||||
- name: renderers | Configure sanitizer TeX markup
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -117,17 +114,16 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_markup_sanitizer_tex_conf }}'
|
||||
when: gitea_install_viewer_addons
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_sanitizer_tex' ]
|
||||
|
||||
- name: Configure markdown markup
|
||||
- name: renderers | Configure markdown markup
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_markdown']
|
||||
block:
|
||||
- name: Configure markdown markup
|
||||
ini_file:
|
||||
- name: renderers | Configure markdown markup
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -136,17 +132,17 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_markup_markdown_conf }}'
|
||||
when: gitea_install_viewer_addons
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_markdown' ]
|
||||
|
||||
- name: Configure docx markup
|
||||
- name: renderers | Configure docx markup
|
||||
when: gitea_install_viewer_addons
|
||||
tags: ['git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_docx']
|
||||
block:
|
||||
- name: Configure the docx markup
|
||||
ini_file:
|
||||
- name: renderers | Configure the docx markup
|
||||
community.general.ini_file:
|
||||
path: '{{ gitea_conf_dir }}/app.ini'
|
||||
section: '{{ item.section }}'
|
||||
option: '{{ item.option }}'
|
||||
|
@ -155,17 +151,14 @@
|
|||
owner: '{{ gitea_user }}'
|
||||
group: '{{ gitea_group }}'
|
||||
mode: '0640'
|
||||
create: no
|
||||
create: false
|
||||
loop: '{{ gitea_markup_docx_conf }}'
|
||||
notify: restart gitea
|
||||
notify: Restart gitea
|
||||
|
||||
- name: Create the docx template
|
||||
- name: renderers | Create the docx template
|
||||
become: true
|
||||
become_user: '{{ gitea_user }}'
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: "$body$"
|
||||
dest: '{{ gitea_data_dir }}/custom/templates/docx-basic.html'
|
||||
|
||||
when: gitea_install_viewer_addons
|
||||
tags: [ 'git', 'gitea', 'gitea_addons', 'gitea_conf', 'gitea_docx' ]
|
||||
|
||||
mode: "0644"
|
||||
|
|
|
@ -11,9 +11,6 @@ MAX_CREATION_LIMIT = {{ gitea_max_repository_per_user }}
|
|||
PROTOCOL = {{ gitea_server_protocol }}
|
||||
HTTP_ADDR = {{ gitea_http_addr }}
|
||||
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 }}
|
||||
DOMAIN = {{ gitea_hostname }}
|
||||
HTTP_PORT = {{ gitea_http_port }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue