initial commit

This commit is contained in:
Marius Alwan Meyer 2022-10-14 15:08:14 +02:00
commit 449c55d299

52
tasks/main.yaml Normal file
View File

@ -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"