1
0
forked from infra/ansible

gitea: cleanup role

This commit is contained in:
Markus 2024-01-11 17:30:34 +01:00
parent cf373d84ec
commit 4a56b35fdd

View File

@ -6,8 +6,8 @@
- name: Create user
user: name={{ gitea_user }} home=/home/{{ gitea_user }} group={{ gitea_group }}
- name: Create gitea directories
file: path={{ item }} state=directory owner={{ gitea_user }}
- name: Create directories
file: path={{ item }} state=directory owner={{ gitea_user }} group={{ gitea_group }}
with_items:
- /opt/gitea
- /opt/gitea/custom
@ -17,13 +17,13 @@
get_url: url={{ gitea_url }} dest=/opt/gitea/gitea-{{ gitea_version }} mode=0755
register: gitea_download
- name: Sylink gitea binary
- name: Symlink gitea binary
file: src=/opt/gitea/gitea-{{ gitea_version }} dest=/opt/gitea/gitea state=link
when: gitea_download.changed
notify: Restart gitea
- name: Configure gitea
template: src=app.ini.j2 dest=/opt/gitea/custom/conf/app.ini force=no owner={{ gitea_user }}
template: src=app.ini.j2 dest=/opt/gitea/custom/conf/app.ini force=no owner={{ gitea_user }} group={{ gitea_group }}
- name: Install systemd unit
template: src=gitea.service.j2 dest=/lib/systemd/system/gitea.service
@ -67,7 +67,7 @@
notify: Restart nginx
- name: Enable gitea
service: name=gitea enabled=yes
service: name=gitea state=started enabled=yes
- name: Enable monitoring
include_role: name=icinga-monitor tasks_from=http