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

+1
View File
@@ -0,0 +1 @@
-6
View File
@@ -1,6 +0,0 @@
---
- name: restart pterodactyl
community.docker.docker_compose_v2:
project_src: "{{ pterodactyl_dir }}"
state: restarted
+15 -41
View File
@@ -8,44 +8,18 @@
mode: "0755"
tags: [pterodactyl]
- name: Render Pterodactyl environment
ansible.builtin.template:
src: env.j2
dest: "{{ pterodactyl_dir }}/.env"
owner: root
group: root
mode: "0600"
no_log: true
tags: [pterodactyl, config]
- name: Ensure Pterodactyl proxy network exists
community.docker.docker_network:
name: "{{ pterodactyl_traefik_network }}"
state: present
when: pterodactyl_routing_mode == "traefik"
tags: [pterodactyl, docker]
- name: Render Pterodactyl Compose file
ansible.builtin.template:
src: compose.yaml.j2
dest: "{{ pterodactyl_dir }}/compose.yaml"
owner: root
group: root
mode: "0644"
notify: restart pterodactyl
tags: [pterodactyl, compose]
- name: Allow Pterodactyl ports
community.general.ufw:
rule: allow
port: "{{ item }}"
proto: tcp
loop: "{{ pterodactyl_tcp_ports }}"
when: pterodactyl_routing_mode == "host"
tags: [pterodactyl, firewall]
- name: Start Pterodactyl
community.docker.docker_compose_v2:
project_src: "{{ pterodactyl_dir }}"
state: present
tags: [pterodactyl, compose]
- name: Deploy Pterodactyl Compose project
ansible.builtin.include_role:
name: compose_project
vars:
compose_project_dir: "{{ pterodactyl_dir }}"
compose_project_directories:
- "{{ pterodactyl_dir }}"
compose_project_env_template_src: "{{ playbook_dir }}/../roles/pterodactyl/templates/env.j2"
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/pterodactyl/templates/compose.yaml.j2"
compose_project_override_template_src: "{{ playbook_dir }}/../roles/pterodactyl/templates/compose.override.yaml.j2"
compose_project_create_proxy_network: "{{ pterodactyl_routing_mode == 'traefik' }}"
compose_project_proxy_network: "{{ pterodactyl_traefik_network }}"
compose_project_firewall_ports: "{{ pterodactyl_tcp_ports }}"
compose_project_firewall_enabled: "{{ pterodactyl_routing_mode in ['host', 'traefik_file'] }}"
tags: [pterodactyl]
@@ -0,0 +1,5 @@
services:
panel: {}
database: {}
cache: {}
+2 -2
View File
@@ -3,9 +3,9 @@ services:
image: {{ pterodactyl_panel_image }}
restart: unless-stopped
env_file: .env
{% if pterodactyl_routing_mode == "host" %}
{% if pterodactyl_routing_mode in ["host", "traefik_file"] %}
ports:
- "{{ pterodactyl_http_port }}:80"
- "{{ nbops_traefik_file_bind_address if pterodactyl_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ pterodactyl_http_port }}:80"
{% endif %}
{% if pterodactyl_routing_mode == "traefik" %}
# internal HTTP service port: 80; not published on the Docker host
+7
View File
@@ -0,0 +1,7 @@
# Upstream Snapshot
This directory stores copied upstream reference files for the `pterodactyl` role.
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.