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

45 lines
1.2 KiB
YAML
Raw Normal View History

2021-06-03 22:51:28 +02:00
---
2022-09-29 23:09:19 +02:00
- name: Create public directory for custom public web files
2021-06-03 22:51:28 +02:00
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
2024-03-03 14:31:11 +01:00
mode: "u=rwX,g=rX,o="
2023-10-29 16:11:12 +01:00
loop:
2024-03-03 14:31:11 +01:00
- "{{ gitea_custom }}/public/assets/"
2021-06-03 22:51:28 +02:00
2022-09-29 23:09:19 +02:00
- name: Transfer custom public web data
2021-06-03 22:51:28 +02:00
become: true
ansible.builtin.copy:
src: "{{ gitea_customize_files_path }}"
2024-03-03 14:31:11 +01:00
dest: "{{ gitea_custom }}/public/assets/"
2021-06-03 22:51:28 +02:00
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
directory_mode: true
2024-03-03 14:31:11 +01:00
mode: "u=rwX,g=rX,o="
2023-10-29 16:11:12 +01:00
failed_when: false
2022-01-16 18:00:52 +01:00
tags: skip_ansible_lint
2021-06-03 22:51:28 +02:00
notify: "Restart gitea"
2024-03-03 12:42:22 +01:00
- 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 }}"
2024-03-03 14:42:29 +01:00
group: "{{ gitea_group }}"
mode: "u=rwX,g=rX,o="
2024-03-03 12:42:22 +01:00
- name: Get custom themes
when: gitea_custom_themes is defined
ansible.builtin.get_url:
url: "{{ item.name }}"
dest: "{{ gitea_custom }}/css/{{ item.name | basename }}"
2024-03-03 14:36:14 +01:00
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
2024-03-03 14:33:02 +01:00
mode: "u=rwX,g=rX,o="
2024-03-03 14:38:14 +01:00
loop: "{{ gitea_custom_themes }}"
2024-03-03 12:42:22 +01:00
notify: "Restart gitea"