ansible-role-gitea/tasks/main.yaml

53 lines
911 B
YAML
Raw Normal View History

2022-10-14 15:08:14 +02:00
---
- 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
2022-10-25 13:18:57 +02:00
image: "gitea/gitea:{{ gitea['version'] }}-rootless"
2022-10-14 15:08:14 +02:00
comparisons:
image: strict
volumes: strict
env: strict
restart_policy: unless-stopped
2022-10-25 13:18:57 +02:00
volumes:
2022-10-14 15:08:14 +02:00
- /data:/var/lib/gitea
- /config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "22:2222"