1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00
ansible_role_gitea/tasks/customize_public_files.yml
L3D b2d64105ae
Merge pull request #149 from pat-s/custom-themes-feat
Feature: allow adding custom themes dynamically
2024-03-04 16:40:10 +01:00

44 lines
1.2 KiB
YAML

---
- name: Create public directory for custom public web files
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: "u=rwX,g=rX,o="
loop:
- "{{ gitea_custom }}/public/assets/"
- name: Transfer custom public web data
become: true
ansible.builtin.copy:
src: "{{ gitea_customize_files_path }}"
dest: "{{ gitea_custom }}/public/assets/"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
directory_mode: true
mode: "u=rwX,g=rX,o="
failed_when: false
tags: skip_ansible_lint
notify: "Restart gitea"
- name: Create css directory for custom themes
when: gitea_custom_themes is defined
ansible.builtin.file:
path: "{{ gitea_custom }}/public/css"
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: "u=rwX,g=rX,o="
- name: Get custom themes
when: gitea_custom_themes is defined
ansible.builtin.get_url:
url: "{{ item.name }}"
dest: "{{ gitea_custom }}/css/{{ item.name | basename }}"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: "u=rwX,g=rX,o="
loop: "{{ gitea_custom_themes }}"
notify: "Restart gitea"