2022-03-04 05:15:25 +00:00
|
|
|
---
|
2022-05-08 22:58:43 +00:00
|
|
|
- name: Check for gitea.configured
|
|
|
|
stat:
|
|
|
|
path: "/etc/gitea.configured"
|
|
|
|
register: gitea_configured_file
|
|
|
|
check_mode: false
|
|
|
|
changed_when: "1 != 1"
|
|
|
|
tags:
|
|
|
|
- mock
|
|
|
|
|
|
|
|
- name: Deploy Gitea configuration
|
|
|
|
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
|
|
|
|
|
2022-03-04 05:15:25 +00:00
|
|
|
# Configuration for gitea
|
2022-03-04 05:27:20 +00:00
|
|
|
- name: Enable Gitea
|
2022-03-28 00:53:47 +00:00
|
|
|
ansible.builtin.service:
|
2022-03-04 05:27:20 +00:00
|
|
|
name: gitea
|
|
|
|
state: started
|
|
|
|
enabled: true
|
2022-05-08 22:58:43 +00:00
|
|
|
when:
|
|
|
|
- not gitea_configured_file.stat.exists|bool
|
2022-03-04 05:27:20 +00:00
|
|
|
|
2022-05-08 22:58:43 +00:00
|
|
|
- name: Drop file to prevent further configuration
|
|
|
|
ansible.builtin.file:
|
|
|
|
name: /etc/gitea.configured
|
|
|
|
state: touch
|
2022-06-02 21:22:36 +00:00
|
|
|
|
|
|
|
- name: Append AcceptEnv for openssh
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
create: true
|
|
|
|
path: /etc/ssh/sshd_config.d/99-gitea.conf
|
|
|
|
line: "AcceptEnv GIT_PROTOCOL"
|
2022-03-04 05:15:25 +00:00
|
|
|
...
|