implemented compose by url, parse, local yaml.

This commit is contained in:
boris committed 2026-07-10 13:32:40 +01:00
1 parent 53695f4fff
commit 784fff8faf
218 files changed
+2271 -640

No files matched your search

+15 -41
View File
@@ -8,41 +8,21 @@
mode: "0755"
tags: [gitea]
- name: Render Gitea environment
ansible.builtin.template:
src: env.j2
dest: "{{ gitea_dir }}/.env"
owner: root
group: root
mode: "0600"
no_log: true
tags: [gitea, config]
- name: Ensure Gitea proxy network exists
community.docker.docker_network:
name: "{{ gitea_traefik_network }}"
state: present
when: gitea_routing_mode == "traefik"
tags: [gitea, docker]
- name: Render Gitea Compose file
ansible.builtin.template:
src: compose.yaml.j2
dest: "{{ gitea_dir }}/compose.yaml"
owner: root
group: root
mode: "0644"
notify: restart gitea
tags: [gitea, compose]
- name: Allow Gitea ports
community.general.ufw:
rule: allow
port: "{{ item }}"
proto: tcp
loop: "{{ gitea_tcp_ports }}"
when: gitea_routing_mode == "host"
tags: [gitea, firewall]
- name: Deploy Gitea Compose project
ansible.builtin.include_role:
name: compose_project
vars:
compose_project_dir: "{{ gitea_dir }}"
compose_project_directories:
- "{{ gitea_dir }}"
compose_project_env_template_src: "{{ playbook_dir }}/../roles/gitea/templates/env.j2"
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/gitea/templates/compose.yaml.j2"
compose_project_override_template_src: "{{ playbook_dir }}/../roles/gitea/templates/compose.override.yaml.j2"
compose_project_create_proxy_network: "{{ gitea_routing_mode == 'traefik' }}"
compose_project_proxy_network: "{{ gitea_traefik_network }}"
compose_project_firewall_ports: "{{ gitea_tcp_ports }}"
compose_project_firewall_enabled: "{{ gitea_routing_mode in ['host', 'traefik_file'] }}"
tags: [gitea]
- name: Allow Gitea SSH port when published behind Traefik
community.general.ufw:
@@ -53,9 +33,3 @@
- gitea_routing_mode == "traefik"
- gitea_publish_ssh | bool
tags: [gitea, firewall]
- name: Start Gitea
community.docker.docker_compose_v2:
project_src: "{{ gitea_dir }}"
state: present
tags: [gitea, compose]