Data directories when the user is pre existing.

This commit is contained in:
Andrea Dell'Amico 2021-06-21 19:40:43 +02:00
parent c1f00a6528
commit 2ee566b187
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,14 @@
- name: Create the gitea directory tree
file: dest={{ gitea_data_dir }}/{{ item }} state=directory owner={{ gitea_user }} group={{ gitea_group }}
with_items: '{{ gitea_data_subdirs }}'
when: gitea_create_service_user
- name: Create the gitea subdirs when we are using a pre existing user
become: True
become_user: '{{ gitea_user }}'
file: dest={{ gitea_data_dir }}/{{ item }} state=directory
with_items: '{{ gitea_data_subdirs }}'
when: not gitea_create_service_user
- name: Create the gitea conf directory
file: dest={{ gitea_conf_dir }} state=directory owner=root group={{ gitea_group }} mode=0750