Kapisi/roles/Foundation/tasks/main.yml

74 lines
1.5 KiB
YAML
Raw Normal View History

2020-10-08 16:33:19 -05:00
---
- name: Base packages
become: yes
package:
name:
- gitea
2022-07-02 10:24:10 -05:00
- name: Make directories
become: yes
file:
path: "/var/lib/gitea/{{ item }}"
owner: gitea
group: gitea
mode: 0750
loop:
- "custom/bin"
- "web-snippets"
2022-09-15 13:16:08 -05:00
- name: Populate config
become: yes
register: config
template:
src: app.ini.j2
2024-04-05 13:16:42 -05:00
dest: /etc/gitea/app.ini
2022-09-15 13:16:08 -05:00
owner: gitea
group: gitea
mode: 0750
2022-07-02 10:24:10 -05:00
- 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
2020-10-08 16:33:19 -05:00
2022-09-15 13:16:08 -05:00
- 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
2022-09-15 13:16:08 -05:00
owner: gitea
group: gitea
2022-07-02 10:24:10 -05:00
- name: Copy hook
become: yes
copy:
src: gitea.hook
dest: /etc/pacman.d/hooks/gitea.hook
owner: gitea
group: gitea
2020-10-08 16:33:19 -05:00
2022-07-02 10:24:10 -05:00
- name: Generate pages
become: yes
2022-09-15 13:16:08 -05:00
register: custompages
2022-07-02 10:24:10 -05:00
command: /usr/bin/runuser -u gitea -- /usr/bin/bash /var/lib/gitea/custom/bin/gen-aninix-custom
2022-09-15 13:16:08 -05:00
- name: Restart service
become: yes
2024-04-05 13:16:42 -05:00
when: config.changed or custompages.changed
2022-09-15 13:16:08 -05:00
service:
2024-04-05 13:16:42 -05:00
name: gitea
2022-09-15 13:16:08 -05:00
state: restarted
enabled: yes