diff --git a/roles/gitea/tasks/main.yml b/roles/gitea/tasks/main.yml index 362c29a..68c71e3 100644 --- a/roles/gitea/tasks/main.yml +++ b/roles/gitea/tasks/main.yml @@ -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