commit 449c55d29911881f3afc1c1ba7aebffdea3994e2 Author: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Fri Oct 14 15:08:14 2022 +0200 initial commit diff --git a/tasks/main.yaml b/tasks/main.yaml new file mode 100644 index 0000000..20a09dd --- /dev/null +++ b/tasks/main.yaml @@ -0,0 +1,52 @@ + +--- +- name: Install Dependencies + apt: + pkg: + - apparmor + - docker.io + - python3-docker + +- name: Create Data Directory + file: + path: /data + state: directory + owner: 1000 + group: 1000 + mode: '0755' + +- name: Create Config Directory + file: + path: /config + state: directory + owner: 1000 + group: 1000 + mode: '0755' + +- name: Start Docker Daemon + systemd: + name: docker + enabled: yes + state: started + +- name: Create Gitea container + community.docker.docker_container: + name: gitea + image: "gitea/gitea:{{ gitea_version }}-rootless" + comparisons: + image: strict + volumes: strict + env: strict + restart_policy: unless-stopped + volumes: + - /data:/var/lib/gitea + - /config:/etc/gitea + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "22:2222" + + + +