diff --git a/tasks/main.yaml b/tasks/main.yaml index 3b505e4..9304775 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -1,11 +1,11 @@ --- -- name: Install Dependencies - apt: - pkg: - - apparmor - - docker.io - - python3-docker +#- name: Install Dependencies +# apt: +# pkg: +# - apparmor +# - docker.io +# - python3-docker - name: Create git USER ansible.builtin.user: @@ -14,7 +14,7 @@ - name: Create Data Directory file: - path: "{{ git_user.home }}/gitea/data" + path: "/opt/gitea/data" state: directory owner: "{{ git_user.uid }}" group: "{{ git_user.group }}" @@ -22,7 +22,7 @@ - name: Create Config Directory file: - path: "{{ git_user.home }}/gitea/config" + path: "/opt/gitea/config" state: directory owner: "{{ git_user.uid }}" group: "{{ git_user.group }}" @@ -37,26 +37,26 @@ - name: Upload Environment File ansible.builtin.template: src: environment.env.j2 - dest: "{{ git_user.home }}/gitea/environment.env" + dest: "/opt/gitea/environment.env" owner: "{{ git_user.name }}" mode: '600' - name: Create Gitea container community.docker.docker_container: name: gitea - image: "gitea/gitea:{{ gitea_vars['version'] }}-rootless" + image: "gitea:{{ gitea_vars['version'] }}-rootless" comparisons: image: strict volumes: strict env: strict restart_policy: unless-stopped volumes: - - "{{ git_user.home }}/gitea/data:/var/lib/gitea" - - "{{ git_user.home }}/gitea/config:/etc/gitea" + - /opt/gitea/data:/var/lib/gitea" + - /opt/gitea/config:/etc/gitea" - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "22:2222" user: "{{ git_user.uid }}:{{ git_user.group }}" - env_file: "{{ git_user.home }}/gitea/environment.env" + env_file: "/opt/gitea/environment.env"