syntax
This commit is contained in:
@@ -50,7 +50,8 @@
|
|||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Run Portainer container with Podman
|
- name: Run Portainer container with Podman
|
||||||
ansible.builtin.command:
|
warn: false # Suppresses the warning that the 'command' module is used for operations that should be idempotent
|
||||||
|
module: ansible.builtin.command
|
||||||
cmd: >
|
cmd: >
|
||||||
podman run -d
|
podman run -d
|
||||||
--name {{ portainer_name }}
|
--name {{ portainer_name }}
|
||||||
@@ -61,8 +62,8 @@
|
|||||||
-v /run/podman/podman.sock:/var/run/docker.sock # Map Podman socket to Docker socket path for Portainer compatibility
|
-v /run/podman/podman.sock:/var/run/docker.sock # Map Podman socket to Docker socket path for Portainer compatibility
|
||||||
-v {{ portainer_data_path }}:/data
|
-v {{ portainer_data_path }}:/data
|
||||||
{{ portainer_image }}
|
{{ portainer_image }}
|
||||||
|
args:
|
||||||
creates: "{{ portainer_data_path }}/portainer.db" # Checks if the Portainer database file exists to ensure idempotency
|
creates: "{{ portainer_data_path }}/portainer.db" # Checks if the Portainer database file exists to ensure idempotency
|
||||||
warn: false # Suppresses the warning that the 'command' module is used for operations that should be idempotent
|
|
||||||
# Verbesserungsvorschlag: Für eine robustere Container-Verwaltung könnte das Modul
|
# Verbesserungsvorschlag: Für eine robustere Container-Verwaltung könnte das Modul
|
||||||
# `community.general.podman_container` verwendet werden, falls die `community.general`-Collection installiert ist.
|
# `community.general.podman_container` verwendet werden, falls die `community.general`-Collection installiert ist.
|
||||||
# Beispiel:
|
# Beispiel:
|
||||||
|
|||||||
Reference in New Issue
Block a user