infra/roles/gitea/tasks/main.yml
2024-01-10 03:36:15 -05:00

47 lines
1.0 KiB
YAML

---
- name: ensure gitea docker/compose exist
file:
path: /etc/docker/compose/gitea
state: directory
owner: root
group: root
mode: 0700
- name: create gitea docker/compose/data/gitea with set uid/gid
file:
path: /etc/docker/compose/gitea/data
state: directory
owner: 1000
group: 1000
mode: 0700
- name: ensure gitea docker/compose/data/gitea exist
file:
path: /etc/docker/compose/gitea/data/gitea/conf
state: directory
owner: 1000
group: 1000
mode: 0700
- name: copy app.ini
copy:
src: ../files/app.ini
dest: /etc/docker/compose/gitea/data/gitea/conf/app.ini
owner: 1000
group: 1000
mode: 0700
- name: build gitea docker-compose.yml.j2
template:
src: ../templates/docker-compose.yml.j2
dest: /etc/docker/compose/gitea/docker-compose.yml
owner: root
group: root
mode: u=rw,g=r,o=r
- name: daemon-reload and enable gitea
ansible.builtin.systemd_service:
state: restarted
enabled: true
name: docker-compose@gitea