main
Дмитрий Козлюк 2 лет назад
Родитель 0b5966f188
Сommit 2ecff05bd7

@ -0,0 +1,15 @@
---
- name: restart Gitea
service:
name: 'gitea'
state: restarted
- name: reload Nginx
service:
name: 'nginx'
state: reloaded
- name: update font cache
become: true
become_user: git
command: 'fc-cache'

@ -53,8 +53,7 @@
dest: '/usr/local/bin/gitea'
mode: 0755
when: gitea_install_binary == 'y'
register: gitea_binary
notify: 'restart Gitea'
- name: ensure state directory structure
file:
@ -84,7 +83,7 @@
owner: 'root'
group: 'git'
mode: 0640
register: gitea_conf
notify: 'restart Gitea'
- name: deploy custom files
become: true
@ -92,25 +91,20 @@
copy:
src: 'custom/'
dest: '/var/lib/gitea/custom/'
register: gitea_custom
notify: 'restart Gitea'
- name: configure service
copy:
src: 'gitea.service'
dest: '/etc/systemd/system/gitea.service'
register: service_conf
notify: 'restart Gitea'
- name: load service configuration
systemd:
daemon_reload: true
when: service_conf.changed
- name: apply service configuration
service:
name: 'gitea'
state: restarted
when: gitea_binary.changed or gitea_conf.changed or gitea_custom.changed or service_conf.changed
- name: ensure the service is started
service:
name: 'gitea'
@ -130,13 +124,7 @@
}
insertbefore: 'location'
marker: '# {mark} ANSIBLE MANAGED BLOCK: Gitea'
register: nginx_conf
- name: apply Nginx configuration
service:
name: 'nginx'
state: reloaded
when: nginx_conf.changed
notify: 'reload Nginx'
- become: true
become_user: git

@ -15,7 +15,7 @@
name:
- fonts-noto-core # Math
- fonts-paratype # Cyrillic
register: fonts
notify: 'update font cache'
- name: ensure font configuration directory
become: true
@ -30,10 +30,17 @@
copy:
src: 'fontconfig.conf'
dest: '/var/lib/git/.local/share/fonts/local.conf'
register: fontconfig
notify: 'update font cache'
- name: update font cache
when: fonts.changed or fontconfig.changed
become: true
become_user: 'git'
command: 'fc-cache'
- name: configure Gitea
blockinfile:
path: '/etc/gitea/app.ini'
block: |
[markup.pptx]
ENABLED = true
FILE_EXTENSIONS = .pptx
RENDER_COMMAND = /usr/local/bin/convert-pptx
IS_INPUT_FILE = true
RENDER_CONTENT_MODE = pdf
marker: '# {mark} ANSIBLE MANAGED BLOCK: PPTX'
notify: 'restart Gitea'

@ -46,10 +46,3 @@ NAMES = Русский,English
[repository]
ROOT = /var/lib/gitea/data/gitea-repositories
[markup.pptx]
ENABLED = true
FILE_EXTENSIONS = .pptx
RENDER_COMMAND = /usr/local/bin/convert-pptx
IS_INPUT_FILE = true
RENDER_CONTENT_MODE = pdf

Загрузка…
Отмена
Сохранить