Skip to content

Commit

Permalink
Add 'platform' parameter mapping for podman container quadlet
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Preindl <[email protected]>
  • Loading branch information
tompre committed Sep 22, 2024
1 parent e8815d3 commit d3a3b4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/module_utils/podman/quadlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ def custom_prepare_params(self, params: dict) -> dict:
params["podman_args"].append(f"--pid {params['pid']}")
if params["pid_file"]:
params["podman_args"].append(f"--pid-file {params['pid_file']}")
if params['platform']:
params["podman_args"].append(f"--platform {params['platform']}")
if params["preserve_fd"]:
for pres in params["preserve_fd"]:
params["podman_args"].append(f"--preserve-fd {pres}")
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/targets/podman_container/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,7 @@
- web
- db
cpus: 0.5
platform: linux/amd64
annotation:
this: "annotation_value"
dns:
Expand Down Expand Up @@ -1289,6 +1290,7 @@
- "NetworkAlias=db"
- "StopSignal=9"
- "PodmanArgs=--cpus 0.5"
- "PodmanArgs=--platform linux/amd64"
loop_control:
label: "{{ item }}"

Expand Down Expand Up @@ -1320,6 +1322,7 @@
- web
- db
cpus: 0.5
platform: linux/amd64
annotation:
this: "annotation_value"
dns:
Expand Down Expand Up @@ -1382,6 +1385,7 @@
- web
- db
cpus: 0.5
platform: linux/amd64
annotation:
this: "annotation_value"
dns:
Expand Down

0 comments on commit d3a3b4f

Please sign in to comment.