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

@ -15,7 +15,7 @@
name: name:
- fonts-noto-core # Math - fonts-noto-core # Math
- fonts-paratype # Cyrillic - fonts-paratype # Cyrillic
register: fonts notify: 'update font cache'
- name: ensure font configuration directory - name: ensure font configuration directory
become: true become: true
@ -30,10 +30,17 @@
copy: copy:
src: 'fontconfig.conf' src: 'fontconfig.conf'
dest: '/var/lib/git/.local/share/fonts/local.conf' dest: '/var/lib/git/.local/share/fonts/local.conf'
register: fontconfig notify: 'update font cache'
- name: update font cache - name: configure Gitea
when: fonts.changed or fontconfig.changed blockinfile:
become: true path: '/etc/gitea/app.ini'
become_user: 'git' block: |
command: 'fc-cache' [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] [repository]
ROOT = /var/lib/gitea/data/gitea-repositories 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

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