diff --git a/defaults/main.yml b/defaults/main.yml index a9c4059..b1428cf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -12,6 +12,7 @@ gitea_base_dir: "/opt/gitea" gitea_bin_dir: "{{ gitea_base_dir }}/bin" gitea_config_dir: "{{ gitea_base_dir }}/custom/conf" gitea_data_dir: "{{ gitea_base_dir }}/data" +gitea_template_dir: "{{ gitea_base_dir }}/custom/templates" gitea_selinux_fcontext: - target: "{{ gitea_log_dir }}(/.*)?" diff --git a/tasks/install.yml b/tasks/install.yml index b30bdca..7c9c29b 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -18,6 +18,7 @@ - "{{ gitea_config_dir }}" - "{{ gitea_data_dir }}" - "{{ gitea_log_dir }}" + - "{{ gitea_template_dir }}/custom" become: True become_user: "{{ gitea_user }}" @@ -38,13 +39,21 @@ become_user: "{{ gitea_user }}" when: not gitea_installed.stat.exists or gitea_current.stdout is version_compare(gitea_version, operator='<', strict=True) -- name: Copy config file - template: - src: "custom/conf/app.ini.j2" - dest: "{{ gitea_config_dir }}/app.ini" - mode: 0600 - notify: __gitea_restart - register: add_config +- block: + - name: Copy config file + template: + src: "custom/conf/app.ini.j2" + dest: "{{ gitea_config_dir }}/app.ini" + mode: 0600 + notify: __gitea_restart + register: add_config + + - name: Copy template files + template: + src: "templates/custom/templates/custom/extra_links_footer.tmpl.j2" + dest: "{{ gitea_template_dir }}/custom/extra_links_footer.tmpl" + mode: 0600 + notify: __gitea_restart become: True become_user: "{{ gitea_user }}" diff --git a/templates/custom/conf/app.ini.j2 b/templates/custom/conf/app.ini.j2 index 0c1c983..28a7c8d 100644 --- a/templates/custom/conf/app.ini.j2 +++ b/templates/custom/conf/app.ini.j2 @@ -182,7 +182,7 @@ ENABLED = false [picture] AVATAR_UPLOAD_PATH = {{ gitea_data_dir }}/avatars REPOSITORY_AVATAR_UPLOAD_PATH = {{ gitea_data_dir }}/repo-avatars -REPOSITORY_AVATAR_FALLBACK = random +REPOSITORY_AVATAR_FALLBACK = none DISABLE_GRAVATAR = {{ 'false' if gitea_gravatar_enabled | bool else 'true' }} GRAVATAR_SOURCE = {{ gitea_gravatar_source }} ENABLE_FEDERATED_AVATAR = {{ gitea_avatar_federation_enabled | bool }}