infra/playbooks/roles/gitea/tasks/main.yml

48 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-03-23 17:43:50 -04:00
---
- name: Ensure gitea docker/compose exist
ansible.builtin.file:
path: /etc/docker/compose/gitea
state: directory
owner: root
group: root
mode: 0700
- name: Ensure gitea docker/compose/data/gitea/conf exist
ansible.builtin.file:
path: /etc/docker/compose/gitea/data/gitea/conf
state: directory
owner: 1000
group: 1000
mode: 0700
recurse: true
- name: Build gitea configuration
ansible.builtin.template:
src: app.ini.j2
dest: /etc/docker/compose/gitea/data/gitea/conf/app.ini
owner: 1000
group: 1000
mode: 0700
- name: Copy public assets
ansible.builtin.copy:
src: public/
dest: /etc/docker/compose/gitea/data/gitea/public
owner: 1000
group: 1000
mode: 0700
- name: Build gitea docker-compose.yml.j2
ansible.builtin.template:
src: docker-compose.yml.j2
dest: /etc/docker/compose/gitea/docker-compose.yml
owner: root
group: root
mode: 0700
- name: Daemon-reload and enable gitea
ansible.builtin.systemd_service:
state: restarted
enabled: true
name: docker-compose@gitea