fixed pip and added portainer agent
This commit is contained in:
@@ -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_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_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
|
||||
|
||||
|
||||
@@ -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_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
|
||||
# und die entsprechenden Berechtigungen für den Zugriff vom Ansible-Zielsystem aus hat.
|
||||
@@ -41,6 +41,12 @@
|
||||
# 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.
|
||||
|
||||
- name: Ensure python3-pip is installed for podman-compose
|
||||
ansible.builtin.apt:
|
||||
name: python3-pip
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Install podman-compose
|
||||
ansible.builtin.pip:
|
||||
name: podman-compose
|
||||
|
||||
18
roles/podman/templates/docker-compose.j2
Normal file
18
roles/podman/templates/docker-compose.j2
Normal 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
|
||||
@@ -12,6 +12,14 @@ services:
|
||||
volumes:
|
||||
- "podman.sock:/var/run/docker.sock"
|
||||
- "{{ portainer_data_path }}:/data"
|
||||
- "{{ portainer_data_path }}"/logs:/logs
|
||||
- "{{ portainer_data_path }}"/certs:/certs
|
||||
restart: always
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user