fixed pip and added portainer agent

This commit is contained in:
2025-11-07 09:04:00 +01:00
parent bb4b26a578
commit 7b8834c5ae
5 changed files with 42 additions and 2 deletions

View File

@@ -25,6 +25,9 @@ Die folgenden Variablen können angepasst werden, um das Verhalten der Rolle zu
| `portainer_web_port` | `9443` | Der Port für die Portainer Web-Oberfläche (HTTPS). | | `portainer_web_port` | `9443` | Der Port für die Portainer Web-Oberfläche (HTTPS). |
| `portainer_edge_agent_port` | `8000` | Der Port für den Portainer Edge Agent. | | `portainer_edge_agent_port` | `8000` | Der Port für den Portainer Edge Agent. |
| `portainer_legacy_port` | `9000` | Der alte Standard-Port für Portainer (HTTP), oft noch exponiert. | | `portainer_legacy_port` | `9000` | Der alte Standard-Port für Portainer (HTTP), oft noch exponiert. |
| `portainer_agent_image` | `"portainer/agent:latest"` | Das Docker/Podman-Image für den Portainer Agenten. |
| `portainer_agent_name` | `"portainer-agent"` | Der Name des Portainer-Agent-Containers. |
| `portainer_agent_port` | `9001` | Der Port, auf dem der Portainer Agent lauscht. |
## Abhängigkeiten ## Abhängigkeiten

View File

@@ -14,5 +14,10 @@ portainer_web_port: 9443 # Port für die Portainer Web-Oberfläche (HTTPS)
portainer_edge_agent_port: 8000 # Port für den Portainer Edge Agent portainer_edge_agent_port: 8000 # Port für den Portainer Edge Agent
portainer_legacy_port: 9000 # Portainer's alter Standard-Port (HTTP), oft noch exponiert portainer_legacy_port: 9000 # Portainer's alter Standard-Port (HTTP), oft noch exponiert
# Portainer Agent configuration
portainer_agent_image: "portainer/agent:latest"
portainer_agent_name: "portainer-agent"
portainer_agent_port: 9001 # Port für den Portainer Agent
# Hinweis: Stellen Sie sicher, dass der NFS-Share auf TrueNAS korrekt konfiguriert und exportiert ist # Hinweis: Stellen Sie sicher, dass der NFS-Share auf TrueNAS korrekt konfiguriert und exportiert ist
# und die entsprechenden Berechtigungen für den Zugriff vom Ansible-Zielsystem aus hat. # und die entsprechenden Berechtigungen für den Zugriff vom Ansible-Zielsystem aus hat.

View File

@@ -41,6 +41,12 @@
# Dies stellt sicher, dass der Podman-Socket für die Kommunikation verfügbar ist, # Dies stellt sicher, dass der Podman-Socket für die Kommunikation verfügbar ist,
# insbesondere für Tools wie Portainer, die sich mit dem Socket verbinden. # insbesondere für Tools wie Portainer, die sich mit dem Socket verbinden.
- name: Ensure python3-pip is installed for podman-compose
ansible.builtin.apt:
name: python3-pip
state: present
update_cache: yes
- name: Install podman-compose - name: Install podman-compose
ansible.builtin.pip: ansible.builtin.pip:
name: podman-compose name: podman-compose

View File

@@ -0,0 +1,18 @@
services:
portainer:
image: portainer/portainer-ce:latest
#command:
# -H unix:///var/run/docker.sock
# --sslcert /certs/docker01.crt
# --sslkey /certs/docker01.key
#command: --admin-password='$2y$05$PWN6rFJ1kFvMFFK6Ajg87.waThVouf66GSt.lTXv6eg9nLv1ztoza'
restart: always
privileged: true
ports:
- 9001:9000
- 9443:9443
volumes:
- /run/podman/podman.sock:/var/run/docker.sock
- "{{ portainer_data_path }}"/data:/data
- "{{ portainer_data_path }}"/logs:/logs
- "{{ portainer_data_path }}"/certs:/certs

View File

@@ -12,6 +12,14 @@ services:
volumes: volumes:
- "podman.sock:/var/run/docker.sock" - "podman.sock:/var/run/docker.sock"
- "{{ portainer_data_path }}:/data" - "{{ portainer_data_path }}:/data"
- "{{ portainer_data_path }}"/logs:/logs restart: always
- "{{ portainer_data_path }}"/certs:/certs
portainer-agent:
image: "{{ portainer_agent_image }}"
container_name: "{{ portainer_agent_name }}"
ports:
- "{{ portainer_agent_port }}:9001"
volumes:
- "podman.sock:/var/run/docker.sock"
- "{{ podman_data_mount_point }}:/var/lib/containers"
restart: always restart: always