This repository has been archived on 2023-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
homeserver-ansible/roles/services/gitea/tasks/main.yml

37 lines
786 B
YAML

- name: Install gitea packages
community.general.pacman:
name: gitea
state: present
- name: Configure gitea
template:
src: templates/gitea_app.ini.j2
dest: /etc/gitea/app.ini
notify: Restart gitea
- name: Change systemd unit file to allow access to dataroot
lineinfile:
path: /usr/lib/systemd/system/gitea.service
insertafter: "^WorkingDirectory.*"
regexp: "^ReadWritePaths.*"
line: "ReadWritePaths={{ dataroot }}/gitea/"
state: present
notify: Restart gitea
- name: Ensure gitea is stopped
service:
name: gitea
state: stopped
- name: Change homedir of gitea
user:
name: gitea
home: "{{ dataroot }}/gitea/"
notify: Restart gitea
- name: Enable gitea
service:
name: gitea
state: started
enabled: yes