Cron job that cleans up the archives.
This commit is contained in:
parent
65a44ffc32
commit
d3f0dd393c
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' }
|
||||
|
|
|
@ -154,3 +154,16 @@ gitea_app_configurations:
|
|||
# - { 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_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: '@weekly', state: 'present' }
|
||||
- { section: 'cron.delete_repo_archives', option: '', value: '', 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" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ galaxy_info:
|
|||
|
||||
license: EUPL 1.2+
|
||||
|
||||
min_ansible_version: "2.8"
|
||||
min_ansible_version: "2.9"
|
||||
|
||||
platforms:
|
||||
- name: Ubuntu
|
||||
|
|
|
@ -90,37 +90,9 @@
|
|||
force: false
|
||||
notify: restart gitea
|
||||
|
||||
- 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
|
||||
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
|
||||
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
|
||||
|
@ -140,7 +112,51 @@
|
|||
- 'templates/custom'
|
||||
- 'public/assets/css'
|
||||
- 'public/assets/components'
|
||||
tags: ['git', 'gitea', 'gitea_conf']
|
||||
|
||||
- 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: 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: 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: gitea | Gitea systemd service
|
||||
tags: ['git', 'gitea', 'gitea_service']
|
||||
|
|
Loading…
Reference in New Issue