|
|
|
@ -20,44 +20,50 @@
|
|
|
|
|
file:
|
|
|
|
|
path: "{{ gitea_user_directory }}"
|
|
|
|
|
state: directory
|
|
|
|
|
mode: 0750
|
|
|
|
|
owner: "{{ gitea_system_user }}"
|
|
|
|
|
group: "{{ nginx_system_user }}"
|
|
|
|
|
mode: "u=rwx,g=rx"
|
|
|
|
|
|
|
|
|
|
- name: Configure installation directory
|
|
|
|
|
file:
|
|
|
|
|
path: "{{ gitea_installation_directory }}"
|
|
|
|
|
state: directory
|
|
|
|
|
owner: "root"
|
|
|
|
|
group: "root"
|
|
|
|
|
mode: 0755
|
|
|
|
|
owner: "{{ gitea_system_user }}"
|
|
|
|
|
group: "{{ gitea_system_user }}"
|
|
|
|
|
mode: "u=rwx,g=rx"
|
|
|
|
|
|
|
|
|
|
- name: Configure custom directory
|
|
|
|
|
file:
|
|
|
|
|
path: "{{ gitea_custom_directory }}"
|
|
|
|
|
state: directory
|
|
|
|
|
mode: 0750
|
|
|
|
|
owner: "{{ gitea_system_user }}"
|
|
|
|
|
group: "{{ gitea_system_user }}"
|
|
|
|
|
mode: "u=rwx,g=rx"
|
|
|
|
|
|
|
|
|
|
- name: Configure repositories directory
|
|
|
|
|
file:
|
|
|
|
|
path: "{{ gitea_repositories_directory }}"
|
|
|
|
|
state: directory
|
|
|
|
|
mode: 0750
|
|
|
|
|
owner: "{{ gitea_system_user }}"
|
|
|
|
|
group: "{{ gitea_system_user }}"
|
|
|
|
|
mode: "u=rwx,g=rx"
|
|
|
|
|
|
|
|
|
|
- name: Configure gitea
|
|
|
|
|
template:
|
|
|
|
|
dest: "{{ gitea_configuration_path }}"
|
|
|
|
|
group: "{{ gitea_system_user }}"
|
|
|
|
|
mode: 0640
|
|
|
|
|
owner: root
|
|
|
|
|
src: "app.ini"
|
|
|
|
|
group: "{{ gitea_system_user }}"
|
|
|
|
|
register: gitea_configure
|
|
|
|
|
|
|
|
|
|
- name: Install auto update script for gitea
|
|
|
|
|
template:
|
|
|
|
|
src: "{{ gitea_update_script }}"
|
|
|
|
|
group: root
|
|
|
|
|
mode: 0744
|
|
|
|
|
owner: root
|
|
|
|
|
dest: "{{ gitea_update_script_path }}"
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: "u=rwx,g=rx,o=r"
|
|
|
|
|
|
|
|
|
|
- name: Download gitea
|
|
|
|
|
become_user: "{{ gitea_system_user }}"
|
|
|
|
|