38 lines
812 B
YAML
38 lines
812 B
YAML
- name: Install gitea packages
|
|
community.general.pacman:
|
|
name: gitea
|
|
state: present
|
|
|
|
- name: Ensure gitea is stopped
|
|
service:
|
|
name: gitea
|
|
state: stopped
|
|
|
|
- name: Configure gitea
|
|
template:
|
|
src: templates/gitea_app.ini.j2
|
|
dest: /etc/gitea/app.ini
|
|
register: gitea_conf
|
|
|
|
- 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
|
|
register: gitea_conf
|
|
|
|
- name: Change homedir of gitea
|
|
user:
|
|
name: gitea
|
|
home: "{{ dataroot }}/gitea/"
|
|
register: gitea_conf
|
|
|
|
- name: Enable gitea
|
|
service:
|
|
name: gitea
|
|
state: restarted
|
|
enabled: yes
|
|
when: gitea_conf.changed
|