74 lines
1.5 KiB
YAML
74 lines
1.5 KiB
YAML
---
|
|
- name: Base packages
|
|
become: yes
|
|
package:
|
|
name:
|
|
- gitea
|
|
|
|
- name: Make directories
|
|
become: yes
|
|
file:
|
|
path: "/var/lib/gitea/{{ item }}"
|
|
owner: gitea
|
|
group: gitea
|
|
mode: 0750
|
|
loop:
|
|
- "custom/bin"
|
|
- "web-snippets"
|
|
|
|
- name: Populate config
|
|
become: yes
|
|
register: config
|
|
template:
|
|
src: app.ini.j2
|
|
dest: /etc/gitea/app.ini
|
|
owner: gitea
|
|
group: gitea
|
|
mode: 0750
|
|
|
|
- name: Copy web-snippets
|
|
become: yes
|
|
copy:
|
|
src: web-snippets/
|
|
dest: /var/lib/gitea/web-snippets
|
|
owner: gitea
|
|
group: gitea
|
|
mode: 0640
|
|
|
|
- name: Copy scripts
|
|
become: yes
|
|
copy:
|
|
src: custom/
|
|
dest: /var/lib/gitea/custom/
|
|
owner: gitea
|
|
group: gitea
|
|
|
|
- name: Publish AniNIX/Yggdrasil CSS
|
|
become: yes
|
|
get_url:
|
|
url: https://github.com/BenZuser/Emby-Web-Dark-Themes-CSS/raw/master/RED/theme.css
|
|
dest: /var/lib/gitea/custom/public/assets/css/emby-web-dark-theme-BenZuser.css
|
|
owner: gitea
|
|
group: gitea
|
|
|
|
- name: Copy hook
|
|
become: yes
|
|
copy:
|
|
src: gitea.hook
|
|
dest: /etc/pacman.d/hooks/gitea.hook
|
|
owner: gitea
|
|
group: gitea
|
|
|
|
- name: Generate pages
|
|
become: yes
|
|
register: custompages
|
|
command: /usr/bin/runuser -u gitea -- /usr/bin/bash /var/lib/gitea/custom/bin/gen-aninix-custom
|
|
|
|
- name: Restart service
|
|
become: yes
|
|
when: config.changed or custompages.changed
|
|
service:
|
|
name: gitea
|
|
state: restarted
|
|
enabled: yes
|