50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
---
|
|
- name: Check for gitea.configured
|
|
ansible.builtin.stat:
|
|
path: "/etc/gitea.configured"
|
|
register: gitea_configured_file
|
|
check_mode: false
|
|
changed_when: "1 != 1"
|
|
tags:
|
|
- mock
|
|
|
|
- name: Deploy Gitea configuration
|
|
ansible.builtin.template:
|
|
src: "etc/gitea/conf/app.ini.j2"
|
|
dest: "/etc/gitea/conf/app.ini"
|
|
owner: git
|
|
group: git
|
|
mode: '0660'
|
|
notify: restart_gitea
|
|
when:
|
|
- not gitea_configured_file.stat.exists|bool
|
|
|
|
# Configuration for gitea
|
|
- name: Enable Gitea
|
|
ansible.builtin.service:
|
|
name: gitea
|
|
state: started
|
|
enabled: true
|
|
when:
|
|
- not gitea_configured_file.stat.exists|bool
|
|
|
|
- name: Drop template direct for sign up link
|
|
ansible.builtin.copy:
|
|
src: "var/lib/gitea/custom/templates/user/auth/signup.tmpl"
|
|
dest: "/var/lib/gitea/custom/templates/user/auth/signup.tmpl"
|
|
mode: '0644'
|
|
owner: git
|
|
group: git
|
|
|
|
- name: Drop file to prevent further configuration
|
|
ansible.builtin.file:
|
|
name: /etc/gitea.configured
|
|
state: touch
|
|
|
|
- name: Append AcceptEnv for openssh
|
|
ansible.builtin.lineinfile:
|
|
create: true
|
|
path: /etc/ssh/sshd_config.d/99-gitea.conf
|
|
line: "AcceptEnv GIT_PROTOCOL"
|
|
...
|