forgejo/tasks/configure.yml

74 lines
1.6 KiB
YAML

---
- name: '[DIR] - Create bin dir'
file:
path: '{{ gitea_bindir }}'
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0750'
- name: '[DIR] - Create lib dir'
file:
path: '{{ gitea_lib_dir }}'
state: directory
mode: '0750'
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
- name: '[DIR] - Create lib dirs'
file:
path: "{{ gitea_lib_dir }}/{{ item }}"
state: directory
mode: '0750'
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
with_items:
- 'custom'
- 'data'
- 'log'
- name: '[DIR] - Create etc dir'
file:
path: /etc/gitea
state: directory
mode: '0770'
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
- name: '[CONF] - Deploy gitea config'
template:
src: etc/gitea/app.ini.j2
dest: "{{ gitea_confdir }}"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
notify: Restart gitea
tags: config
- name: "[CONF] - Create img folder"
file:
path: "{{ gitea_theme_dir }}/public/img/"
state: 'directory'
owner: '{{ gitea_user }}'
group: '{{ gitea_group }}'
when: gitea_theme_dir is defined
tags: config
- name: "[CONF] - Deploy img folder"
copy:
src: '{{ gitea_extra_files_path }}/'
dest: "{{ gitea_theme_dir }}/public/img/"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: 0755
when: gitea_theme_dir is defined
tags: config
- name: '[CONF] - Install dependencies for renderers'
apt:
name: "{{ item.apt }}"
update_cache: yes
loop: "{{ gitea_markup_config }}"
when: item.enable == 'true' and item.apt != ""
tags: config