From 38b7c80217c4e72b1d8988eb1e60bb6e77334114 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 18 Apr 2024 07:52:22 +0200 Subject: Adding upstream version 9.4.0+dfsg. Signed-off-by: Daniel Baumann --- .../containers/podman/CHANGELOG.rst | 105 +- ansible_collections/containers/podman/FILES.json | 1404 ++++---- .../containers/podman/MANIFEST.json | 4 +- .../containers/podman/changelogs/changelog.yaml | 76 +- .../containers/podman/docs/_static/alabaster.css | 4 +- .../podman/docs/_static/antsibull-minimal.css | 3 +- .../containers/podman/docs/_static/basic.css | 47 +- .../containers/podman/docs/_static/doctools.js | 132 +- .../podman/docs/_static/documentation_options.js | 2 +- .../podman/docs/_static/language_data.js | 2 +- .../containers/podman/docs/_static/pygments.css | 1 + .../containers/podman/docs/_static/searchtools.js | 93 +- .../podman/docs/_static/sphinx_highlight.js | 144 + .../containers/podman/docs/buildah_connection.html | 190 +- .../podman/docs/environment_variables.html | 186 + .../containers/podman/docs/genindex.html | 101 +- .../containers/podman/docs/index.html | 163 +- .../containers/podman/docs/objects.inv | Bin 1193 -> 6943 bytes .../containers/podman/docs/podman_connection.html | 280 +- .../podman/docs/podman_container_exec_module.html | 363 ++ .../podman/docs/podman_container_info_module.html | 247 +- .../podman/docs/podman_container_module.html | 3586 ++++++++------------ .../podman/docs/podman_containers_module.html | 202 +- .../podman/docs/podman_export_module.html | 240 +- .../docs/podman_generate_systemd_module.html | 787 ++--- .../podman/docs/podman_image_info_module.html | 239 +- .../podman/docs/podman_image_module.html | 1199 +++---- .../podman/docs/podman_import_module.html | 285 +- .../containers/podman/docs/podman_load_module.html | 226 +- .../podman/docs/podman_login_info_module.html | 257 +- .../podman/docs/podman_login_module.html | 309 +- .../podman/docs/podman_logout_module.html | 285 +- .../podman/docs/podman_network_info_module.html | 233 +- .../podman/docs/podman_network_module.html | 662 ++-- .../containers/podman/docs/podman_play_module.html | 631 ++-- .../podman/docs/podman_pod_info_module.html | 233 +- .../containers/podman/docs/podman_pod_module.html | 1496 ++++---- .../podman/docs/podman_prune_module.html | 403 +++ .../podman/docs/podman_runlabel_module.html | 227 ++ .../containers/podman/docs/podman_save_module.html | 337 +- .../podman/docs/podman_secret_info_module.html | 257 ++ .../podman/docs/podman_secret_module.html | 393 +-- .../containers/podman/docs/podman_tag_module.html | 203 +- .../podman/docs/podman_unshare_become.html | 399 +-- .../podman/docs/podman_volume_info_module.html | 229 +- .../podman/docs/podman_volume_module.html | 400 ++- .../containers/podman/docs/search.html | 44 +- .../podman/plugins/module_utils/podman/common.py | 119 +- .../module_utils/podman/podman_container_lib.py | 204 +- .../plugins/module_utils/podman/podman_pod_lib.py | 66 +- .../podman/plugins/modules/podman_container.py | 92 +- .../plugins/modules/podman_container_exec.py | 244 ++ .../plugins/modules/podman_container_info.py | 2 +- .../podman/plugins/modules/podman_containers.py | 2 +- .../podman/plugins/modules/podman_export.py | 33 +- .../plugins/modules/podman_generate_systemd.py | 44 +- .../podman/plugins/modules/podman_image.py | 35 +- .../podman/plugins/modules/podman_import.py | 41 +- .../podman/plugins/modules/podman_login.py | 2 +- .../podman/plugins/modules/podman_network.py | 35 +- .../podman/plugins/modules/podman_play.py | 65 + .../podman/plugins/modules/podman_pod.py | 54 +- .../podman/plugins/modules/podman_prune.py | 6 +- .../podman/plugins/modules/podman_runlabel.py | 86 + .../podman/plugins/modules/podman_save.py | 19 +- .../podman/plugins/modules/podman_secret.py | 97 +- .../podman/plugins/modules/podman_secret_info.py | 121 + .../podman/plugins/modules/podman_volume.py | 8 +- .../connection_podman/test_connection.inventory | 4 +- .../targets/podman_container/tasks/main.yml | 334 +- .../targets/podman_container_exec/tasks/main.yml | 67 + .../tasks/idem_all.yml | 57 + .../tasks/idem_ports.yml | 2 + .../tasks/idem_systemd.yml | 133 + .../podman_container_idempotency/tasks/main.yml | 3 + .../targets/podman_containers/tasks/main.yml | 2 +- .../targets/podman_export/tasks/main.yml | 82 +- .../targets/podman_generate_systemd/tasks/main.yml | 42 + .../targets/podman_image/tasks/main.yml | 23 +- .../targets/podman_image_info/tasks/main.yml | 14 +- .../targets/podman_import/tasks/main.yml | 77 + .../targets/podman_play/tasks/files/Containerfile | 3 + .../podman_play/tasks/files/kube-buil-test.yaml | 21 + .../targets/podman_play/tasks/files/play-pod.yaml | 14 + .../integration/targets/podman_play/tasks/main.yml | 18 + .../targets/podman_play/tasks/play-with-build.yml | 51 + .../podman_play/tasks/play-with-options.yml | 52 + .../integration/targets/podman_pod/tasks/main.yml | 58 +- .../targets/podman_pod/tasks/net-pod.yml | 2 + .../targets/podman_pod/tasks/resource-limit.yml | 38 + .../targets/podman_runlabel/files/Dockerfile | 6 + .../targets/podman_runlabel/files/testinstall.sh | 2 + .../targets/podman_runlabel/tasks/main.yml | 48 + .../integration/targets/podman_save/tasks/main.yml | 36 +- .../targets/podman_secret/tasks/main.yml | 176 + .../targets/podman_secret_info/tasks/main.yml | 107 + 96 files changed, 11871 insertions(+), 8285 deletions(-) create mode 100644 ansible_collections/containers/podman/docs/_static/sphinx_highlight.js create mode 100644 ansible_collections/containers/podman/docs/environment_variables.html create mode 100644 ansible_collections/containers/podman/docs/podman_container_exec_module.html create mode 100644 ansible_collections/containers/podman/docs/podman_prune_module.html create mode 100644 ansible_collections/containers/podman/docs/podman_runlabel_module.html create mode 100644 ansible_collections/containers/podman/docs/podman_secret_info_module.html create mode 100644 ansible_collections/containers/podman/plugins/modules/podman_container_exec.py create mode 100644 ansible_collections/containers/podman/plugins/modules/podman_runlabel.py create mode 100644 ansible_collections/containers/podman/plugins/modules/podman_secret_info.py create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_container_exec/tasks/main.yml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_systemd.yml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/Containerfile create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/kube-buil-test.yaml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/play-pod.yaml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-build.yml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-options.yml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/resource-limit.yml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/Dockerfile create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/testinstall.sh create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/tasks/main.yml create mode 100644 ansible_collections/containers/podman/tests/integration/targets/podman_secret_info/tasks/main.yml (limited to 'ansible_collections/containers') diff --git a/ansible_collections/containers/podman/CHANGELOG.rst b/ansible_collections/containers/podman/CHANGELOG.rst index 1a53a5460..7f94f59cc 100644 --- a/ansible_collections/containers/podman/CHANGELOG.rst +++ b/ansible_collections/containers/podman/CHANGELOG.rst @@ -5,6 +5,109 @@ Ansible Podman modules and plugins Release Notes .. contents:: Topics +v1.12.0 +======= + +Release Summary +--------------- + +New podman_secret_info module, improvements and bugfixes + +Minor Changes +------------- + +- Add log_opt and annotaion options to podman_play module +- Add option to parse CreateCommand easily for diff calc +- Add support for setting underlying interface in podman_network +- Alias generate systemd options stop_timeout and time +- Fix CI rootfs for podman_container +- Fix broken conmon version in CI install +- Improve security_opt comparison between existing container +- podman_container - Add new arguments to podman status commands +- podman_container - Update env_file to accept a list of files instead of a single file +- podman_secret_info - Add secrets info module + +Bugfixes +-------- + +- Add idempotency for podman_secret module +- Catch exceptions when no JSON output in podman_image +- Fail if systemd generation failed and it's explicitly set +- Fix example name +- Fix idempotency for podman_network +- Fix idempotency when using 0.0.0.0 in ports +- Fix multi-image support for podman_save +- Fix volume inspection by name in podman_volume +- Recreate stopped containers if recreate flag is enabled + +New Modules +----------- + +- containers.podman.podman_secret_info - Secrets info module + +v1.11.0 +======= + +Minor Changes +------------- + +- Update docs + +v1.10.4 +======= + +Release Summary +--------------- + +Bugfixes and new modules + +Minor Changes +------------- + +- podman_container - Add support for health-on-failure action +- podman_image -Add target support for podman build image +- podman_play - Add build and context_dir option to podman_play +- podman_pod - Add options for resource limits to podman_pod + +Bugfixes +-------- + +- Fix common file for Python 2.7 +- podman_network - Do not force network removal by default +- podman_network - Fix network DNS enable idempotency issue +- podman_pod - Fix idempotency when running inside Podman container + +New Modules +----------- + +- containers.podman.podman_container_exec - Executes a command in a running container +- containers.podman.podman_runlabel - Run given label from given image + +v1.10.3 +======= + +Release Summary +--------------- + +Bugfixes and new options for modules + +Bugfixes +-------- + +- podman_container - Add diff and change detection to systemd generation +- podman_container - Add example with quotes in command to docs +- podman_container - Fix healthcheck issue where defined in image +- podman_container - Fix idempoency issue with PID of container +- podman_container - Fix idempotency for RestartPolicy when MaximumRetryCount +- podman_container - Fix idempotency for devices +- podman_container - Fixed idempotency with cpus parameter +- podman_container - Improve docs about container env_file on remote machine +- podman_container - added cpu_quota parameter to podman_container +- podman_export,podman_import - Adding volume import and export option +- podman_generate_systemd - Add a force field to podman_generate_systemd +- podman_image - Add restart-sec and other options to systemd generation +- podman_image - Fix pulling short image name + v1.10.2 ======= @@ -273,7 +376,7 @@ Bugfixes - Don't add newlines to secrets - Fix issue with podman and exposed ports - Fix signal diff for truncated and RT signal names -- Support empty stings in prefixes +- Support empty strings in prefixes - Update error message when pull set to false v1.8.1 diff --git a/ansible_collections/containers/podman/FILES.json b/ansible_collections/containers/podman/FILES.json index 91a086b4b..717a994c3 100644 --- a/ansible_collections/containers/podman/FILES.json +++ b/ansible_collections/containers/podman/FILES.json @@ -8,1655 +8,1851 @@ "format": 1 }, { - "name": "README.md", + "name": "setup.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0b3c0bf86d855ce3b4341bf6f72a5ea3e6300c09ca88d793ca3b149175eaa30c", + "chksum_sha256": "85ef52c56819164efc5178d25aa03a432cdb8431ad0c99255802ce19a1719602", "format": 1 }, { - "name": "meta", + "name": "test-requirements.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9b72b7289eba420f51eb614c54f609181bb26e96caef2abf06c02339a77d2e08", + "format": 1 + }, + { + "name": "changelogs", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "meta/runtime.yml", + "name": "changelogs/config.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f07aa47b7583a6a8420798081029b8cdfb09cbf5564acff6f49b6c3237102618", + "chksum_sha256": "72cc16b684890f4595ab75ffdd6f80f5ae19bc84cbb2d82606bc840eb7842209", "format": 1 }, { - "name": "tests", + "name": "changelogs/changelog.yaml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1bb58fab4d48702b87006c6ac9577c634e8f42aef65280dbca266caf6468d50b", + "format": 1 + }, + { + "name": "meta", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/.gitignore", + "name": "meta/runtime.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600", + "chksum_sha256": "f07aa47b7583a6a8420798081029b8cdfb09cbf5564acff6f49b6c3237102618", "format": 1 }, { - "name": "tests/integration", + "name": "docs", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets", + "name": "docs/_static", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_containers", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/custom.css", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "39f23a6561786e3cb4e33e4a96562a1305a8b74c0d45dc215a64018692cd5d4c", "format": 1 }, { - "name": "tests/integration/targets/podman_containers/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/sphinx_highlight.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0a20464b65797522de18421a7db1a0851a26aae6dd06b7109d442236313c27ee", "format": 1 }, { - "name": "tests/integration/targets/podman_containers/tasks/main.yml", + "name": "docs/_static/documentation_options.js", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "797fea2fb07c77406b8bb15ea7ff2e4be6105e75664c4b2f2660dd17c5b19c99", + "chksum_sha256": "e2718b75af040caf95a8915192026ec541cc7ad4c73b0160b7c4c2f4564d7d4f", "format": 1 }, { - "name": "tests/integration/targets/podman_containers/tasks/root-multi.yml", + "name": "docs/_static/pygments.css", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "99e92a4d72c87817aa74687d7a9fc99da5adbeeaffb04fa8da55cac88d2082ad", + "chksum_sha256": "6f6d5ca74e8fbc721d70c8db260ab4ac75b69316daa3854a4614d9f3b2ff0631", "format": 1 }, { - "name": "tests/integration/targets/podman_generate_systemd", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/alabaster.css", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "13f494414f5bca3551442ddf4ad0e42e2403a8757304c1b9787b18ef539a2eac", "format": 1 }, { - "name": "tests/integration/targets/podman_generate_systemd/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/underscore.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "218fb1c1fc72e9af6b866f430be2a67fa376392b4db2f4dbf32772671b6ae55c", "format": 1 }, { - "name": "tests/integration/targets/podman_generate_systemd/tasks/main.yml", + "name": "docs/_static/jquery-3.6.0.js", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "543282244455a56c9e012885bf5f9c55eb53992356886d734530768908b18069", + "chksum_sha256": "1fe2bb5390a75e5d61e72c107cab528fc3c29a837d69aab7d200e1dbb5dcd239", "format": 1 }, { - "name": "tests/integration/targets/podman_network_info", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/searchtools.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5b9facbcb36e5e15e409e2db42439fb8cbc1e43275e337a645bb3c76c3191b93", "format": 1 }, { - "name": "tests/integration/targets/podman_network_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/_sphinx_javascript_frameworks_compat.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "2f1e30341b31300bdc3af29ee4a64e0f40ed15492345387bb47542d9b9b4813c", "format": 1 }, { - "name": "tests/integration/targets/podman_network_info/tasks/main.yml", + "name": "docs/_static/language_data.js", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5d60cdf4f76199919395dd477e7feb32d8ebbb4b736d0a13052290a3fcb5e5e3", + "chksum_sha256": "95b1d44e1ba5a3155d89f8427a3b2c981158f956bf48b9cdf0030265e8b7a609", "format": 1 }, { - "name": "tests/integration/targets/connection", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/underscore-1.3.1.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f808f0aa32fbe90fb9c9c846917faff3fdd4e236c284b76c02dd33753dc90177", "format": 1 }, { - "name": "tests/integration/targets/connection/test_connection.yml", + "name": "docs/_static/basic.css", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3b9bd8af9cbdf99e7d47189d08b57d0eb5030fde078c88a3387d2af701ae85a8", + "chksum_sha256": "9980fa28cbdcd8d6b437edcb1a911e0e2a788d7fa0dfe6ea25a302d824a3094d", "format": 1 }, { - "name": "tests/integration/targets/connection/create-nonroot-user.yml", + "name": "docs/_static/jquery.js", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7af8e41655a36f526418cadf93e37da7117cc67761e34ab9c41b68ac8c00a268", + "chksum_sha256": "ff1523fb7389539c84c65aba19260648793bb4f5e29329d2ee8804bc37a3fe6e", "format": 1 }, { - "name": "tests/integration/targets/podman_container", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/jquery-3.5.1.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "416a3b2c3bf16d64f6b5b6d0f7b079df2267614dd6847fc2f3271b4409233c37", "format": 1 }, { - "name": "tests/integration/targets/podman_container/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/doctools.js", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3d62b81f63b0418a39a8f5a323203d88ddafc8c5226f86d311970025d86d7b6c", "format": 1 }, { - "name": "tests/integration/targets/podman_container/tasks/main.yml", + "name": "docs/_static/underscore-1.13.1.js", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c68fe4de7794a839e5535e7fa3e258f23eb7c741f5a593b8c678549599fcae3f", + "chksum_sha256": "cc10f799cd0f6b65f95c4012445497e5ba3cb9f51964a9468940b27bde98b487", "format": 1 }, { - "name": "tests/integration/targets/podman_pod_info", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/plus.png", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "54115199b96a130cba02147c47c0deb43dcc9b9f08b5162bba8642b34980ac63", "format": 1 }, { - "name": "tests/integration/targets/podman_pod_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/antsibull-minimal.css", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "dd914facd58095fed7317de336bdf32ac00ff3de539432463df397d2ae15a696", "format": 1 }, { - "name": "tests/integration/targets/podman_pod_info/tasks/main.yml", + "name": "docs/_static/minus.png", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f04166aa3908442835ca6e7f747429d54cdeb8bcbf272e3977de79f3ad653271", + "chksum_sha256": "47e7fc50db3699f1ca41ce9a2ffa202c00c5d1d5180c55f62ba859b1bd6cc008", "format": 1 }, { - "name": "tests/integration/targets/connection_podman", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/_static/file.png", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "5c4bc9a16aebf38c4b950f59b8e501ca36495328cb9eb622218bce9064a35e3e", "format": 1 }, { - "name": "tests/integration/targets/connection_podman/runme.sh", + "name": "docs/.nojekyll", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "06a213f3e9c159069f1fd055653438f8487d1b8939ee735a0025b151ef2a4626", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "format": 1 }, { - "name": "tests/integration/targets/connection_podman/test_connection.inventory", + "name": "docs/podman_runlabel_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f75a535c614dbdf71e61eb605b4bd1e857bbec85ff3ae9da0eff6f138f1ae56d", + "chksum_sha256": "bd2c799ac88932287c4882a8eb6df2658a00db7555612154b0eca97045f11e73", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_image_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ad81d2bc548a343fbc3d4a3a05b1c33d2d68e25e508f2693a701e6f01dcf417b", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_container_exec_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "883fc959057af7f386aa0660220cab0747ecac6eb6d407b94d2df2dc35c74a7e", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_stopsignal.yml", + "name": "docs/podman_container_info_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "262e884e0b4a561fbc57726f13763e3b07a92786386c9a5c7ccd13270e38b475", + "chksum_sha256": "1586177c16bee40047743f246310abd28bb7b51abd946c720b8470a22b5bd749", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_all.yml", + "name": "docs/podman_play_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e38f46049fc88b6b07346be2f74e8ff28a17fb93a0fd7832cde1aa593686584f", + "chksum_sha256": "24e23f870e9fe67c6ef322ec6b2ccfae6bc050c15bbf8dda518db96f144326db", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_labels.yml", + "name": "docs/podman_containers_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d375e2ec31f9f9d16adca8328db880ee3d0b56238db5686ac9bbb0dcc2017fe7", + "chksum_sha256": "1178735f6fadfbf2d7cbd4985b604aaa430546edafa114af5e3d20dc04e5460a", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/build_test_container.yml", + "name": "docs/podman_pod_info_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a61627e2d0be2e1400f0d0f60df5d636eea74b18aa87fa2a0d7eb4c419c2a8ae", + "chksum_sha256": "f2ffd379e0f542e651766415c6287f569f2dd42ee5a3e9933684bc250b0d11fd", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_users.yml", + "name": "docs/podman_login_info_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "36f44ffaa058046e62d0e53be0f7edf8232d9145ec44a948c64c15d0c0c3cd23", + "chksum_sha256": "ce4892819aba341084ce055cc05d9bb5bb613e266f3efe4a2052da2aa20094ca", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/root-podman-network.yml", + "name": "docs/buildah_connection.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ab1cc0f347537ab4403395b2b2b43f815fe49c7ae35b88b498931fdcb33abd75", + "chksum_sha256": "881d9972167f058e968516dbc4fe01bc1cea54a16fb0e6f9de03addf58ca7fc8", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_networks.yml", + "name": "docs/podman_import_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3a0f1de00361a8381b06934149d6433afd307d010d7396be307f7d7f6f27a52e", + "chksum_sha256": "5b288cf15269fc040df5d04a3ae7e96c08635006c9322b53c1675e5c6d44ee81", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_volumes.yml", + "name": "docs/podman_unshare_become.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5e330c3f7359aaf7e6e3379db977b909e04bcec89b894f1f8f0d44dfebdecffd", + "chksum_sha256": "79fa1444a95d81dc3a7dbdd1c4796fdb14e277e787b96b7229a3fe0561c862d1", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/main.yml", + "name": "docs/podman_volume_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "18e691763a36d0d76768bd211cc725b9fd5920bb7602bf0d7cdbcffd3f573fed", + "chksum_sha256": "cf2a4a5caff2f79ccc6e51d9bdfee1484b24523fd31b9f6a058bd2bf3f741470", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/rootless-podman-network.yml", + "name": "docs/podman_save_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a4d6028c7466608b10983c9acf25af9b99d9ce0aa27ed17500af287d28070af4", + "chksum_sha256": "c7ce5ddbc8c5d95d67fb1d7d90d6393f772a256f1f76a7b71062e4f9f177c847", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_workdir.yml", + "name": "docs/podman_generate_systemd_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "23d729589e61ae790bd81b281f89b48b443b830cf3a6932eb0bdf4289289f677", + "chksum_sha256": "4e5d799252e205b60924cd5158976f71995f5e4e06edd348bb0fa608199dfcef", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml", + "name": "docs/searchindex.js", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "41538dd47dfa1197c8c984f9e1f47f84cf5a8a35ec7a2c0f0f6388cc9d52daef", + "chksum_sha256": "68a79c703ad84cc805f3945b454e0871f6e2562c6e75ec6f20702a8c1a96a6fa", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_pods.yml", + "name": "docs/podman_container_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "53d129901494fa24a8075ade0576e2536ae3cbfc5d8fb8d116a10978594a6a49", + "chksum_sha256": "c9489eb47093750ec7c7780a6e6fcd84041f34b115371e7300df05af4ae3b112", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/root-podman.yml", + "name": "docs/podman_network_info_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ed7d2ee3e9e352efc0266c2264469b3f759f1630562794c98f5da83949506bec", + "chksum_sha256": "50a9aa361b09cbeb8311501040429f537223523ac993cc29e8e841c1a330b338", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_network_aliases.yml", + "name": "docs/podman_logout_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "04c6bf4fd56edcc1a49a47e98f448c89cf8e90e1d7d67db9997f0af94ef09dc6", + "chksum_sha256": "980d9040d448274ca106e7e3ea1a2d7e8781a83518bcf30acb4f088f9a8e5585", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/files", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/objects.inv", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d0b13de8051aab95f660ee9e17f976cc53853a562fead4c6e95ac30562f6252d", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/files/start.sh", + "name": "docs/podman_load_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bb80ab18f5df29c7c77f8acea5285af4f0f4d1ddac161801d0ff26ac242c2d86", + "chksum_sha256": "0c34f66544c9547d6873175f5f828992f22eb7180ed2867f7e1b113495e832d1", "format": 1 }, { - "name": "tests/integration/targets/podman_container_idempotency/files/Dockerfile", + "name": "docs/podman_tag_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "002a8a2bf46c5da32a3583bc93c08347c6f7e16c51cd5abdf562d77df313da5c", + "chksum_sha256": "b0318bb65447c742ad02998a8e0ec8c3b322fb552fdcc97c86d0d5aa94b0511d", "format": 1 }, { - "name": "tests/integration/targets/podman_login", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/search.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "586d63e6da7c3da64b93d96964e37b0355b62674868eccb23e3478abe568727e", "format": 1 }, { - "name": "tests/integration/targets/podman_login/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_pod_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "291e6c4c92da12468197580b183b4e33f3764f2363c21d811318fbd5fdad31d4", "format": 1 }, { - "name": "tests/integration/targets/podman_login/tasks/main.yml", + "name": "docs/podman_network_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5156c546ca2b45f035ae5b28a7220e06c4fb8051f93a6077e0308b06cafa15b3", + "chksum_sha256": "c0e41390cf13ce9e63c26d28fbb7c919ddba089f32405bd1c86144dbe25fec98", "format": 1 }, { - "name": "tests/integration/targets/podman_image", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_image_info_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "8052d065501c86d3fce53e1a870b257b1b120d4cee5787d65b09e33a8dcb3cc5", "format": 1 }, { - "name": "tests/integration/targets/podman_image/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_secret_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1aa857495902d922a8d34cc1f99ea5ed5832bba967598980ee126d3e2d672194", "format": 1 }, { - "name": "tests/integration/targets/podman_image/tasks/main.yml", + "name": "docs/genindex.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "504161866489c1cf29ac448d3300b9ca801bd0feb0f2cc9fa93368e578290689", + "chksum_sha256": "267654c6dfb8d96914725b0bd774e09c72dfdcfb065ae073f9fc732b01b543d0", "format": 1 }, { - "name": "tests/integration/targets/podman_image/files", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_login_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f85b0efcef6198ef699a371ba9cdfe4dd13563fd1982e82b9d5faaa47be08324", "format": 1 }, { - "name": "tests/integration/targets/podman_image/files/Containerfile", + "name": "docs/index.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ec6bc9968ca494ec22fcb0bed27fc12ddf2241fea1fe58d0d8a4f0b33487b506", + "chksum_sha256": "5b7c42262b9c12a137d255adf2a28983e897e6651689f7a49573b919d32e0722", "format": 1 }, { - "name": "tests/integration/targets/podman_pod", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/environment_variables.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "754ab0bc744fd2f640f433d8ec17c4520c35bf5985108501b479b3653fe3c0d0", "format": 1 }, { - "name": "tests/integration/targets/podman_pod/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "docs/podman_export_module.html", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ba113aee00093ea0a28f737e4b0d628c509ac7a901714b33e921faba02ab1b22", "format": 1 }, { - "name": "tests/integration/targets/podman_pod/tasks/network-tests.yml", + "name": "docs/podman_volume_info_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9a8a2c641891bca7bd86d7c984970b869bad967b127d9ea5cad004dbb7bf1401", + "chksum_sha256": "a4aebadb3c98b409f3b467ef8c4bccdc58d0368ec499779854c1dd888cd452ef", "format": 1 }, { - "name": "tests/integration/targets/podman_pod/tasks/main.yml", + "name": "docs/podman_prune_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8b9f85c31703910db51bd2ab49a1e8d97d1acecc4581ce9e8523654cd9341f75", + "chksum_sha256": "df4a1997ae54270f03a880ab39fd691e19b14ed22c1840605b54481168894738", "format": 1 }, { - "name": "tests/integration/targets/podman_pod/tasks/net-pod.yml", + "name": "docs/podman_secret_info_module.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3b7ac39a1292fc65b9c3aa27d9d83e436414749e62011f3b278b8e46e8005b29", + "chksum_sha256": "02c6ca29827997e672d37dc06699e7ef832c7d5738ed3e93e592a00c6de05804", "format": 1 }, { - "name": "tests/integration/targets/podman_pod/tasks/root-pod.yml", + "name": "docs/podman_connection.html", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "32a941c1ab343de12be5b6b942885697a47a90e70b4ba8b8f6b41830fd748be7", + "chksum_sha256": "f8c5acf0a527705c23c59bc4153c6f24a825d1ce2bd77b4672ff185ab34d4b61", "format": 1 }, { - "name": "tests/integration/targets/podman_volume_info", + "name": "CHANGELOG.rst", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "96fa1187145da3dfde0d211ecf989620afdaf7e7f43970273741cb962be65dde", + "format": 1 + }, + { + "name": "plugins", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_volume_info/tasks", + "name": "plugins/become", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_volume_info/tasks/main.yml", + "name": "plugins/become/podman_unshare.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d951a17810a5d38195f5b6b9f2b61997be78c33f425b3d6c8424250d658d4115", + "chksum_sha256": "2dab878a68742976acd46a1310a37e9e0777b1953f86ee31dd9e0a29e9dfc3f3", "format": 1 }, { - "name": "tests/integration/targets/podman_export", + "name": "plugins/connection", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_export/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/connection/buildah.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "2dd2825640c5a1d888fe78dcde28734278e8329dc69af136c70b1bb0fb308208", "format": 1 }, { - "name": "tests/integration/targets/podman_export/tasks/main.yml", + "name": "plugins/connection/__init__.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "76181438486472743107a963f54f04b10abb52a8c5c14599b065b01a503a5021", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "format": 1 }, { - "name": "tests/integration/targets/podman_image_info", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/connection/podman.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "fd66ec667402f515bab568f0b6b0f12bde1d122ac58ba86d722c97b12364b3ce", "format": 1 }, { - "name": "tests/integration/targets/podman_image_info/tasks", + "name": "plugins/modules", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_image_info/tasks/main.yml", + "name": "plugins/modules/podman_volume_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4f201709a3c5b823be22d4d3cc6470386f652eceaff37b5bf3acf6a05175a060", + "chksum_sha256": "eb8cf9d38d438d24589d547458f4c0ba8341f687eb8a1ded30de1fc0b8933c83", "format": 1 }, { - "name": "tests/integration/targets/podman_prune", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/modules/podman_import.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9b17de1350a59abf3d1dd3b6faa6b7a66e7085bb06746027bee22be1371ba5b5", "format": 1 }, { - "name": "tests/integration/targets/podman_prune/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/modules/podman_secret.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6b19a2f4453349e74339f952ca4d86512b55e792c3ed8d991ec7a681ec1de850", + "format": 1 + }, + { + "name": "plugins/modules/podman_load.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "96694bda39431f44186d599db567446d72debdf52a4a5c51f5fd66fa515229fc", + "format": 1 + }, + { + "name": "plugins/modules/podman_export.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "48a73c06e5fe4b1f1d4cd70262d32559a13e73eda7012ea5c074fdbabbc2470a", + "format": 1 + }, + { + "name": "plugins/modules/podman_prune.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "214aa5244363a5d1e8423c82a770e5c02f7dfc331b8756607a567995e6d6ec50", + "format": 1 + }, + { + "name": "plugins/modules/podman_volume.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "880e428a2c953a1b550330b8e70159b775166dd21547056e75d64650c0892091", + "format": 1 + }, + { + "name": "plugins/modules/podman_pod.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "c2f505a53d4948d78ada958c5f33d94f5a703c684b97e12f47b5837654a55575", + "format": 1 + }, + { + "name": "plugins/modules/podman_image.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "03afa78794f979607671d9ce4676e1e51daa11fb1f706a2d3dbb498b2cee16bd", + "format": 1 + }, + { + "name": "plugins/modules/podman_container.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f31967e1063756efda806e7645d28c0d7bf1d794f92302c79d907dd44f2f3b68", + "format": 1 + }, + { + "name": "plugins/modules/podman_save.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ddb55cc96d2a174a1f2e61fcd22a435b11394d53199bd2afeca374139a43be2c", + "format": 1 + }, + { + "name": "plugins/modules/podman_play.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "453838a1c683a4e7e9cbc2e72f7ad8912961a16e87c3aa2d3ed3319fb934eb90", + "format": 1 + }, + { + "name": "plugins/modules/podman_network_info.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "9beb6e0c733ca304f38f95116dfd89569df21a68428039ef59ec9650314c5222", + "format": 1 + }, + { + "name": "plugins/modules/__init__.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "format": 1 + }, + { + "name": "plugins/modules/podman_login_info.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e8f615071a379d21b8f012a60c24036c4812239faf8e6aea2be6e5ca21bbcc4f", + "format": 1 + }, + { + "name": "plugins/modules/podman_runlabel.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3e5ca7f03d9703edab8219fac8d24bdecd88a1da007ace8985bb12e6ddd7c4da", + "format": 1 + }, + { + "name": "plugins/modules/podman_image_info.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d79ccfb526e599404fcb618d04195f8c7fa8158a7cce1f2d5d592b626a6976e2", + "format": 1 + }, + { + "name": "plugins/modules/podman_network.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "ca507252b965895a3ed3e24ccbb28541700212ac0f2b340abb901b35a909d760", + "format": 1 + }, + { + "name": "plugins/modules/podman_containers.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "166b573ae344ccf93b2e33703fc8d8eeb1cd5e251eba40a95ba037cad4716b7a", "format": 1 }, { - "name": "tests/integration/targets/podman_prune/tasks/main.yml", + "name": "plugins/modules/podman_generate_systemd.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "724466a522dc7a0d89201a540856373a6613e11f6869faf0accfe01497c972c8", + "chksum_sha256": "54348fd0d118db0d4f7596c60250814aa61ef9dc2a4bae74522bf61287fa35a7", "format": 1 }, { - "name": "tests/integration/targets/__init__.py", + "name": "plugins/modules/podman_container_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "chksum_sha256": "c0ccb2118efb225624f13e01c499eec274d0d864fd151cca94e0128e994d4b5e", "format": 1 }, { - "name": "tests/integration/targets/podman_tag", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/modules/podman_logout.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "7cc7da9cf123ffb9180e98f2fe5704f628831d44014efd25c48cedd1c28a9b7c", "format": 1 }, { - "name": "tests/integration/targets/podman_tag/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/modules/podman_secret_info.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "d6254c8325c6ff5fffb632062f7401d8a1a94d5f1786691e88bee07fe26734f9", "format": 1 }, { - "name": "tests/integration/targets/podman_tag/tasks/main.yml", + "name": "plugins/modules/podman_login.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2d0f2ae65dac8386961528eb33d02de73fe60026cb5566ffa68b4467b7c45678", + "chksum_sha256": "54abe75a9053423a2189bdadee8b0e6c9b8f530ba82523a8024ea211626ecde2", "format": 1 }, { - "name": "tests/integration/targets/connection_buildah", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/modules/podman_pod_info.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "18e5fd6f6142467654af44f458a13c662d3beb2fa7957b137cbc13852cfcb440", "format": 1 }, { - "name": "tests/integration/targets/connection_buildah/runme.sh", + "name": "plugins/modules/podman_container_exec.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b4d64b01f03eb7aa81f3fbe7202c816188bc8432fedccb5251feeb330f7c16e4", + "chksum_sha256": "071bce898ea72b63aff4d47909fd191bbdbdca0f53fb6813b48c1b4ace95478a", "format": 1 }, { - "name": "tests/integration/targets/connection_buildah/test_connection.inventory", + "name": "plugins/modules/podman_tag.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5012fc0a2af812b87b675f31cd605ecf8d80fe32667b6ed20ea51fe0c8685742", + "chksum_sha256": "f748d6640b2cd18ac2caaf0a9d74917c1f139649df48dd514a11d8a1e7abc7cf", "format": 1 }, { - "name": "tests/integration/targets/podman_volume", + "name": "plugins/module_utils", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_volume/tasks", + "name": "plugins/module_utils/podman", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_volume/tasks/main.yml", + "name": "plugins/module_utils/podman/podman_pod_lib.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fcf996710e030b8188cd7f49daa73c153c23513dfedcacea9e22615223ce8d7d", + "chksum_sha256": "2d25257e5aa77d26f60370d64385254353450c6ef9b86b1a442723a7adf8e1f8", "format": 1 }, { - "name": "tests/integration/targets/podman_login_info", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/module_utils/podman/__init__.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "format": 1 }, { - "name": "tests/integration/targets/podman_login_info/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/module_utils/podman/common.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0faf94fa1606dc1a67c73def618c0e4c366ef60ff26723d1613c1f157cc5bb32", "format": 1 }, { - "name": "tests/integration/targets/podman_login_info/tasks/main.yml", + "name": "plugins/module_utils/podman/podman_container_lib.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "21ef50fdd0d92d39240b082c1f9ba3782478e615863d3e8d9a0960b175b8158e", + "chksum_sha256": "ab338a3648ebff54756f05cd349d74d686f626884db95440dba379232c40ea34", "format": 1 }, { - "name": "tests/integration/targets/podman_logout", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "plugins/module_utils/__init__.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "format": 1 }, { - "name": "tests/integration/targets/podman_logout/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "COPYING", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", "format": 1 }, { - "name": "tests/integration/targets/podman_logout/tasks/main.yml", + "name": "setup.cfg", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2e1c3fcd8cd0d917e7faad2dc447381ec2ccff2bc3a57b02060cd965ffbb45c1", + "chksum_sha256": "df77e31936daa4f2509685b9442e8518931651064d466d9f6e0b597ebf92d6cd", "format": 1 }, { - "name": "tests/integration/targets/podman_import", + "name": "Makefile", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "77424e5d6417f24ffd8e4d00d85e942ba4eaa912129ae01f5f4e26a2e2500d2d", + "format": 1 + }, + { + "name": "SECURITY.md", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b73dc04e41dbb3774a3244e8e40d13eb97d169caa3e1230a622e077d60c1edd9", + "format": 1 + }, + { + "name": "tests", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_import/tasks", + "name": "tests/sanity", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_import/tasks/main.yml", + "name": "tests/sanity/ignore-2.18.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "97b2238ac4c41ff1480ce080f0d3b495b4e36ace1e00e0bd93664840a3e8bc52", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/sanity/ignore-2.13.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/sanity/ignore-2.10.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/root-play.yml", + "name": "tests/sanity/ignore-2.11.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "65c0fccbaf7c464b539f895addc0cf3e7536f9cb8b9f7d8e28725a90d345326b", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/main.yml", + "name": "tests/sanity/ignore-2.9.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1d9542a076df468e5e3abca07b9c319fb13ec825adef5250744d88155e44b0b1", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/files", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/sanity/requirements.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "471c16a6346df1b74757306a436cbab143fe65c30e6f9cda1f5c7179d6012b73", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/files/play-root1.yaml", + "name": "tests/sanity/ignore-2.14.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "049f1ad67c57e019423f28c77ca8cec13e714ae8727fedfde71792ec56131344", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/files/envdata.yaml", + "name": "tests/sanity/ignore-2.12.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d5ebdb092f5473ae5174dfbac83b6623343326f308d02eea8fb58fbb7b42d264", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/files/play-root3.yaml", + "name": "tests/sanity/ignore-2.17.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3e26cb69976a1b7d1f79a5dafc74e368d9297bb63b29c1c213d5bbddc0e62bf3", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/files/play1.yaml", + "name": "tests/sanity/ignore-2.16.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1031804932a82f741e8cddaa397e73554e4784a790a3d4493d1b5c8f5f6bbf7e", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_play/tasks/files/play3.yaml", + "name": "tests/sanity/ignore-2.15.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c92c31b3ad0cd9992a6a9e391d07d69b2b9f3cc39b410e1cbc710bda40323b3d", + "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", "format": 1 }, { - "name": "tests/integration/targets/podman_load", + "name": "tests/unit", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_load/tasks", + "name": "tests/unit/plugins", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_load/tasks/main.yml", + "name": "tests/unit/plugins/modules", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/unit/plugins/modules/test_common.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "078d5ae2eb9bf74046e34c6e7c003e87bb6e08f1a6fd49fcf5d6bb2174bae393", + "chksum_sha256": "79b1c212210b13bb60b8d97b140351ce088707f3574b8fc61b076e827e050891", "format": 1 }, { - "name": "tests/integration/targets/podman_container_info", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "name": "tests/unit/plugins/modules/test_container_lib.py", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "08beb5d507944be15d2c0e01081fa99c43d522e813d5ecde2b038d71132e2d7d", "format": 1 }, { - "name": "tests/integration/targets/podman_container_info/tasks", + "name": "tests/.gitignore", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600", + "format": 1 + }, + { + "name": "tests/integration", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_container_info/tasks/main.yml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f753b105c6b8ca293911422dc3372b82e98ba5b3f7065cac0a20976933a0c03f", + "name": "tests/integration/targets", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_save", + "name": "tests/integration/targets/podman_volume_info", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_save/tasks", + "name": "tests/integration/targets/podman_volume_info/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_save/tasks/main.yml", + "name": "tests/integration/targets/podman_volume_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "152d5451d258a629cf21d5ac5acf315ea2bb578115266d9c14c5f9938462621e", + "chksum_sha256": "d951a17810a5d38195f5b6b9f2b61997be78c33f425b3d6c8424250d658d4115", "format": 1 }, { - "name": "tests/integration/targets/podman_network", + "name": "tests/integration/targets/podman_volume", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_network/tasks", + "name": "tests/integration/targets/podman_volume/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_network/tasks/main.yml", + "name": "tests/integration/targets/podman_volume/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b7659bb415aa72e1ff4ec1b2fc681ce7261fccdaa21804c1ecc9e9ee1a3b2cd0", + "chksum_sha256": "fcf996710e030b8188cd7f49daa73c153c23513dfedcacea9e22615223ce8d7d", "format": 1 }, { - "name": "tests/integration/targets/podman_secret", + "name": "tests/integration/targets/podman_image", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_secret/tasks", + "name": "tests/integration/targets/podman_image/files", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/integration/targets/podman_secret/tasks/main.yml", + "name": "tests/integration/targets/podman_image/files/Containerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7543b23822eadfd9b37e99024b34fc48ae386434266b4efd17d0a41f6b4a33b9", + "chksum_sha256": "ec6bc9968ca494ec22fcb0bed27fc12ddf2241fea1fe58d0d8a4f0b33487b506", "format": 1 }, { - "name": "tests/sanity", + "name": "tests/integration/targets/podman_image/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/sanity/ignore-2.12.txt", + "name": "tests/integration/targets/podman_image/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "chksum_sha256": "71b89cf589c2372b615111daa3acc9134561569dafea88fbe85fb4601f341d76", "format": 1 }, { - "name": "tests/sanity/ignore-2.15.txt", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "name": "tests/integration/targets/podman_save", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/sanity/ignore-2.14.txt", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "name": "tests/integration/targets/podman_save/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/sanity/ignore-2.11.txt", + "name": "tests/integration/targets/podman_save/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "chksum_sha256": "18dd5ac7950abeb6dcfdb97f4b9b6e00aeacd1be3b41dae762cca6e237bbbf93", "format": 1 }, { - "name": "tests/sanity/ignore-2.10.txt", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "name": "tests/integration/targets/podman_logout", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/sanity/ignore-2.17.txt", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "name": "tests/integration/targets/podman_logout/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/sanity/ignore-2.13.txt", + "name": "tests/integration/targets/podman_logout/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "chksum_sha256": "2e1c3fcd8cd0d917e7faad2dc447381ec2ccff2bc3a57b02060cd965ffbb45c1", "format": 1 }, { - "name": "tests/sanity/requirements.txt", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "471c16a6346df1b74757306a436cbab143fe65c30e6f9cda1f5c7179d6012b73", + "name": "tests/integration/targets/connection_podman", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/sanity/ignore-2.16.txt", + "name": "tests/integration/targets/connection_podman/test_connection.inventory", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "chksum_sha256": "05ecc4306d853f3a6057303bbcc0750d7fbb86e044cd135faf01c35ad06b6d25", "format": 1 }, { - "name": "tests/sanity/ignore-2.18.txt", + "name": "tests/integration/targets/connection_podman/runme.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "chksum_sha256": "06a213f3e9c159069f1fd055653438f8487d1b8939ee735a0025b151ef2a4626", "format": 1 }, { - "name": "tests/sanity/ignore-2.9.txt", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "361bd77aa7cbdafdfcdec95128188299e4641bcce983571a747031794cca7cf5", + "name": "tests/integration/targets/podman_container_exec", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "tests/unit", + "name": "tests/integration/targets/podman_container_exec/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/unit/plugins", + "name": "tests/integration/targets/podman_container_exec/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "f30d948810c85f961037c816face62e7a9591a26d566ecf5d19f6490161788de", + "format": 1 + }, + { + "name": "tests/integration/targets/podman_export", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/unit/plugins/modules", + "name": "tests/integration/targets/podman_export/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "tests/unit/plugins/modules/test_common.py", + "name": "tests/integration/targets/podman_export/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "79b1c212210b13bb60b8d97b140351ce088707f3574b8fc61b076e827e050891", + "chksum_sha256": "608c9d218d3e66b53ad1b5f2b3d6c295ca109edf2d82b08eccc3d8840278f4ab", "format": 1 }, { - "name": "tests/unit/plugins/modules/test_container_lib.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "08beb5d507944be15d2c0e01081fa99c43d522e813d5ecde2b038d71132e2d7d", + "name": "tests/integration/targets/podman_container_idempotency", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "CHANGELOG.rst", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "c91227ecab2f8122e75b90edd2b186e056c2d6b24bdebb8f551c89a88c768a23", + "name": "tests/integration/targets/podman_container_idempotency/files", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "Makefile", + "name": "tests/integration/targets/podman_container_idempotency/files/start.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "77424e5d6417f24ffd8e4d00d85e942ba4eaa912129ae01f5f4e26a2e2500d2d", + "chksum_sha256": "bb80ab18f5df29c7c77f8acea5285af4f0f4d1ddac161801d0ff26ac242c2d86", "format": 1 }, { - "name": "test-requirements.txt", + "name": "tests/integration/targets/podman_container_idempotency/files/Dockerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9b72b7289eba420f51eb614c54f609181bb26e96caef2abf06c02339a77d2e08", + "chksum_sha256": "002a8a2bf46c5da32a3583bc93c08347c6f7e16c51cd5abdf562d77df313da5c", "format": 1 }, { - "name": "docs", + "name": "tests/integration/targets/podman_container_idempotency/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "docs/index.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "185ddc1721b3221ee5e7120d9d0e3adaa2c155c873a785de928e4a576666d126", + "chksum_sha256": "cc446d64740817d2b04de867ac5e17e3118a4191e332f1c4bc493a34bc58b298", "format": 1 }, { - "name": "docs/podman_container_info_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "edb8ac79d7335e63e33af1f64a0b20d704b232889b521e213176af2132cdf641", + "chksum_sha256": "7b740c06632cb043c3fc57f226023b59b4a425dc28d4c3c1e005835bc3e6f727", "format": 1 }, { - "name": "docs/podman_image_info_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/root-podman.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3f23f7e10a40ec55e13ea420a0fa83ac0610bdd43c84514a6c1708c9ebf1aa62", + "chksum_sha256": "ed7d2ee3e9e352efc0266c2264469b3f759f1630562794c98f5da83949506bec", "format": 1 }, { - "name": "docs/genindex.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_systemd.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1ec8cab9fc5e738f4f0f78d64cd45e5a79dc740a2e9cb3bc3abdf695826182bb", + "chksum_sha256": "272808017955d5ef59448a1b9ce1bb98d18bce0b1e4b658d1fe6c5b4fcdc884b", "format": 1 }, { - "name": "docs/podman_import_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_stopsignal.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ff204d6cf91daddb150da0f34fbc4bfa28cf84c4f3ed104b55f7b6320b72a507", + "chksum_sha256": "262e884e0b4a561fbc57726f13763e3b07a92786386c9a5c7ccd13270e38b475", "format": 1 }, { - "name": "docs/podman_image_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_volumes.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "82972948a66e20a17482602179d6abb9b7f2cc0cea3cd82a5ef1e41735cb075e", + "chksum_sha256": "5e330c3f7359aaf7e6e3379db977b909e04bcec89b894f1f8f0d44dfebdecffd", "format": 1 }, { - "name": "docs/buildah_connection.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_network_aliases.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "93ed4e1dbc108b8f150d2cb401e6625ecaf9f0ca562c181a24eacdb261afea0a", + "chksum_sha256": "04c6bf4fd56edcc1a49a47e98f448c89cf8e90e1d7d67db9997f0af94ef09dc6", "format": 1 }, { - "name": "docs/podman_secret_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/rootless-podman-network.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "50d7b2b70d923adad42b6ae667fd13833a5bb7440b20033d6db25a5650c5bfce", + "chksum_sha256": "a4d6028c7466608b10983c9acf25af9b99d9ce0aa27ed17500af287d28070af4", "format": 1 }, { - "name": "docs/podman_logout_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_workdir.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "31cea0f1d2a99ee5b74a348e2b22351e19e71c0b74c250a69c17619eb93f9399", + "chksum_sha256": "23d729589e61ae790bd81b281f89b48b443b830cf3a6932eb0bdf4289289f677", "format": 1 }, { - "name": "docs/search.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_labels.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fc191e9241bb8ed264113aa901ad1710ab417f654cba2ee4df18c2f88adb546e", + "chksum_sha256": "d375e2ec31f9f9d16adca8328db880ee3d0b56238db5686ac9bbb0dcc2017fe7", "format": 1 }, { - "name": "docs/podman_tag_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/build_test_container.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "286f10cd2fbb608af76c93e19f4f8a644679e0b539bbe97c3e04871a27de0beb", + "chksum_sha256": "a61627e2d0be2e1400f0d0f60df5d636eea74b18aa87fa2a0d7eb4c419c2a8ae", "format": 1 }, { - "name": "docs/podman_container_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/root-podman-network.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2effbe440fd15457380d9fa62538b076ec71f34bfcb4230aa090d9ab05c785fd", + "chksum_sha256": "ab1cc0f347537ab4403395b2b2b43f815fe49c7ae35b88b498931fdcb33abd75", "format": 1 }, { - "name": "docs/podman_generate_systemd_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_users.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9614cb03e529a0daa3f181cd03788c23a236c2d1b8198472c83c1667bfdd6e35", + "chksum_sha256": "36f44ffaa058046e62d0e53be0f7edf8232d9145ec44a948c64c15d0c0c3cd23", "format": 1 }, { - "name": "docs/podman_login_info_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_pods.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5180bc765d44dc6395816994f83cd12cd30bf1caf881962529d2741ec971302e", + "chksum_sha256": "53d129901494fa24a8075ade0576e2536ae3cbfc5d8fb8d116a10978594a6a49", "format": 1 }, { - "name": "docs/podman_pod_info_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_networks.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e2e58e25cb5373dd3e9fe01da3b1471a9d9fa8f5ca2ee2e3ca4227d710a0f385", + "chksum_sha256": "3a0f1de00361a8381b06934149d6433afd307d010d7396be307f7d7f6f27a52e", "format": 1 }, { - "name": "docs/podman_containers_module.html", + "name": "tests/integration/targets/podman_container_idempotency/tasks/idem_all.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e6ed48ef52885c81febd5ee84dda4585a1907cdca3246eb08204e84240bd2168", + "chksum_sha256": "f7ccc04c97fb27dfdf4462cc73f74e244c76759ce0a5b4b7d785e6f8a50b7a56", "format": 1 }, { - "name": "docs/podman_export_module.html", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "8091049e24f2e429269a073fda43b81e06bd552cf6f5b5cd8edff5c797f0ff01", + "name": "tests/integration/targets/podman_secret_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/objects.inv", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "871ab2d351de046dfc0d83739444a54bb8b34702c5017616f2e2bcb2237448d4", + "name": "tests/integration/targets/podman_secret_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/podman_pod_module.html", + "name": "tests/integration/targets/podman_secret_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "58878ee64019153f5ebf9bd5d8e47d8f3ae141c275f318e527ae23b36c7f2369", + "chksum_sha256": "3181d366cf3f25687ff6cceaf0677803bedc1d64e6b766fa66d5882c89240674", "format": 1 }, { - "name": "docs/podman_volume_info_module.html", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "7441ad5b659575e7ec7d3dc89500fd4d29bea2c456c13b5c086b80f24c908c95", + "name": "tests/integration/targets/podman_login", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/podman_connection.html", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "83eee35fb4ee177d2e7d3798a53887d09c1add7c3788db0fb3e3135002d151f0", + "name": "tests/integration/targets/podman_login/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/searchindex.js", + "name": "tests/integration/targets/podman_login/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "65795b29053a20d81c47a9f5ccbb3d444758e6e69e56bb79b6d162a660be81fa", + "chksum_sha256": "5156c546ca2b45f035ae5b28a7220e06c4fb8051f93a6077e0308b06cafa15b3", "format": 1 }, { - "name": "docs/podman_save_module.html", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "351f0fdcecff606697d28aa5da60b2898648f3d9c345fe28ca4e1af0905de0b6", + "name": "tests/integration/targets/podman_tag", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static", + "name": "tests/integration/targets/podman_tag/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/underscore-1.3.1.js", + "name": "tests/integration/targets/podman_tag/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f808f0aa32fbe90fb9c9c846917faff3fdd4e236c284b76c02dd33753dc90177", + "chksum_sha256": "2d0f2ae65dac8386961528eb33d02de73fe60026cb5566ffa68b4467b7c45678", "format": 1 }, { - "name": "docs/_static/language_data.js", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "d35fde9e52ed4840ec7ed105ddb3302a26eb0f53aa151a9491a2dcce0f5d2534", + "name": "tests/integration/targets/podman_containers", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/basic.css", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "21cccb74c6cea5f81052a7e3b64e2a61b4e934d396382b9968a836011ab8d332", + "name": "tests/integration/targets/podman_containers/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/pygments.css", + "name": "tests/integration/targets/podman_containers/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8e0f0718d231994572a476aac9828c7208632904ad4078e827cbbc536850b154", + "chksum_sha256": "f0693a6b04d4dc0d91ff26d5c155f0dde26d8b54d38bad24379b4b45115572ba", "format": 1 }, { - "name": "docs/_static/antsibull-minimal.css", + "name": "tests/integration/targets/podman_containers/tasks/root-multi.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6125dd128e20a65c5ae85d7a10fa9217fa572a19249de5a43cff411d11f367f5", + "chksum_sha256": "99e92a4d72c87817aa74687d7a9fc99da5adbeeaffb04fa8da55cac88d2082ad", "format": 1 }, { - "name": "docs/_static/alabaster.css", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "67e598979516bfa32eae490cfc05ae76e54632b33ab722610ea0e51a8ae6fc6f", + "name": "tests/integration/targets/podman_network", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/documentation_options.js", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "63ac2f97b3d9aabd7b35be07ba3a9167215166a512964d4190dca09de7c306fe", + "name": "tests/integration/targets/podman_network/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/jquery-3.5.1.js", + "name": "tests/integration/targets/podman_network/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "416a3b2c3bf16d64f6b5b6d0f7b079df2267614dd6847fc2f3271b4409233c37", + "chksum_sha256": "b7659bb415aa72e1ff4ec1b2fc681ce7261fccdaa21804c1ecc9e9ee1a3b2cd0", "format": 1 }, { - "name": "docs/_static/jquery.js", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "ff1523fb7389539c84c65aba19260648793bb4f5e29329d2ee8804bc37a3fe6e", + "name": "tests/integration/targets/podman_image_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/underscore-1.13.1.js", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "cc10f799cd0f6b65f95c4012445497e5ba3cb9f51964a9468940b27bde98b487", + "name": "tests/integration/targets/podman_image_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/minus.png", + "name": "tests/integration/targets/podman_image_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "47e7fc50db3699f1ca41ce9a2ffa202c00c5d1d5180c55f62ba859b1bd6cc008", + "chksum_sha256": "2e2b22b24c5afbaf5f7565c37a37cd0294bb0be58d758a75fca3cf7828f283ac", "format": 1 }, { - "name": "docs/_static/file.png", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "5c4bc9a16aebf38c4b950f59b8e501ca36495328cb9eb622218bce9064a35e3e", + "name": "tests/integration/targets/podman_prune", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/jquery-3.6.0.js", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "1fe2bb5390a75e5d61e72c107cab528fc3c29a837d69aab7d200e1dbb5dcd239", + "name": "tests/integration/targets/podman_prune/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/searchtools.js", + "name": "tests/integration/targets/podman_prune/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "306bb4ed7f0208f81bea031e26b9bf893360fe072a1707b04b3097dbed5d58ff", + "chksum_sha256": "724466a522dc7a0d89201a540856373a6613e11f6869faf0accfe01497c972c8", "format": 1 }, { - "name": "docs/_static/custom.css", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "39f23a6561786e3cb4e33e4a96562a1305a8b74c0d45dc215a64018692cd5d4c", + "name": "tests/integration/targets/connection", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/_static/plus.png", + "name": "tests/integration/targets/connection/create-nonroot-user.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "54115199b96a130cba02147c47c0deb43dcc9b9f08b5162bba8642b34980ac63", + "chksum_sha256": "7af8e41655a36f526418cadf93e37da7117cc67761e34ab9c41b68ac8c00a268", "format": 1 }, { - "name": "docs/_static/doctools.js", + "name": "tests/integration/targets/connection/test_connection.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2985f25f79e5ddcd1ed494ca63fc85f215f79e0cd156e622ce2bf3cf2cd9445f", + "chksum_sha256": "3b9bd8af9cbdf99e7d47189d08b57d0eb5030fde078c88a3387d2af701ae85a8", "format": 1 }, { - "name": "docs/_static/_sphinx_javascript_frameworks_compat.js", + "name": "tests/integration/targets/__init__.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2f1e30341b31300bdc3af29ee4a64e0f40ed15492345387bb47542d9b9b4813c", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "format": 1 }, { - "name": "docs/_static/underscore.js", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "218fb1c1fc72e9af6b866f430be2a67fa376392b4db2f4dbf32772671b6ae55c", + "name": "tests/integration/targets/podman_pod", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/podman_pod/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/podman_unshare_become.html", + "name": "tests/integration/targets/podman_pod/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "98ad9b1c13eafc87a9182d2b934b33ae431d6607cc5469a5e7b1b496a6bf5c5b", + "chksum_sha256": "bbe9d769c0aadaea64fb4a3263a8e1cb746e9f78e0f3308dfda1641b5abcc808", "format": 1 }, { - "name": "docs/.nojekyll", + "name": "tests/integration/targets/podman_pod/tasks/network-tests.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "chksum_sha256": "9a8a2c641891bca7bd86d7c984970b869bad967b127d9ea5cad004dbb7bf1401", "format": 1 }, { - "name": "docs/podman_network_info_module.html", + "name": "tests/integration/targets/podman_pod/tasks/net-pod.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6a3de5a6848663951e2fedb6b468d9f58133efca85e9765785c7acd4c2f35154", + "chksum_sha256": "a0f34f0ea7dc20a24b1a0bd29ef7b71fc5b145fd6ee364cea413c01cc858c30d", "format": 1 }, { - "name": "docs/podman_volume_module.html", + "name": "tests/integration/targets/podman_pod/tasks/root-pod.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "50ee43177d24a0bdffc49d96633f4a7a3936621796bbd8df2ece02c206d650cc", + "chksum_sha256": "32a941c1ab343de12be5b6b942885697a47a90e70b4ba8b8f6b41830fd748be7", "format": 1 }, { - "name": "docs/podman_network_module.html", + "name": "tests/integration/targets/podman_pod/tasks/resource-limit.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "1d708c0671a60a91600fa5f15367b119b0243ca826dc28ccd395054e8b59dd56", + "chksum_sha256": "368abd818cd3d326f926d4e0d9e5ee7531f7fa337d48d9abfbb130e4c2e009a5", "format": 1 }, { - "name": "docs/podman_login_module.html", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "887347980d40a3d5b0ebab11bdb2c75ad4b08e4cfc6a6c93d0371c30ceb40289", + "name": "tests/integration/targets/podman_load", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/podman_play_module.html", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "ecfadba6b34d4e86094634e7089287b85122ff2fa1d39b29648aaed545556ab6", + "name": "tests/integration/targets/podman_load/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "docs/podman_load_module.html", + "name": "tests/integration/targets/podman_load/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2690b66c821e7d62be4b9f3e4efe5b3c60af85266e62579c07658786f0d02ce3", + "chksum_sha256": "078d5ae2eb9bf74046e34c6e7c003e87bb6e08f1a6fd49fcf5d6bb2174bae393", "format": 1 }, { - "name": "plugins", + "name": "tests/integration/targets/podman_play", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "plugins/become", + "name": "tests/integration/targets/podman_play/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "plugins/become/podman_unshare.py", + "name": "tests/integration/targets/podman_play/tasks/root-play.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2dab878a68742976acd46a1310a37e9e0777b1953f86ee31dd9e0a29e9dfc3f3", + "chksum_sha256": "65c0fccbaf7c464b539f895addc0cf3e7536f9cb8b9f7d8e28725a90d345326b", "format": 1 }, { - "name": "plugins/connection", + "name": "tests/integration/targets/podman_play/tasks/files", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "plugins/connection/buildah.py", + "name": "tests/integration/targets/podman_play/tasks/files/kube-buil-test.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2dd2825640c5a1d888fe78dcde28734278e8329dc69af136c70b1bb0fb308208", + "chksum_sha256": "c813ffc1f16f8324acbbaad0cf5ad7ee00e0ebd47f314b9ad74f24fd9e2177b0", "format": 1 }, { - "name": "plugins/connection/__init__.py", + "name": "tests/integration/targets/podman_play/tasks/files/play3.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "chksum_sha256": "c92c31b3ad0cd9992a6a9e391d07d69b2b9f3cc39b410e1cbc710bda40323b3d", "format": 1 }, { - "name": "plugins/connection/podman.py", + "name": "tests/integration/targets/podman_play/tasks/files/Containerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fd66ec667402f515bab568f0b6b0f12bde1d122ac58ba86d722c97b12364b3ce", - "format": 1 - }, - { - "name": "plugins/modules", - "ftype": "dir", - "chksum_type": null, - "chksum_sha256": null, + "chksum_sha256": "c0268928bf1b6b6307404eff5d25e292b78239d330dc585c87d810db40307609", "format": 1 }, { - "name": "plugins/modules/podman_container.py", + "name": "tests/integration/targets/podman_play/tasks/files/envdata.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5b66aa5232235305842b8d1352d13fc4113f742785e64cd83b15300750b0cb6d", + "chksum_sha256": "d5ebdb092f5473ae5174dfbac83b6623343326f308d02eea8fb58fbb7b42d264", "format": 1 }, { - "name": "plugins/modules/podman_save.py", + "name": "tests/integration/targets/podman_play/tasks/files/play-root1.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "dfadcbb79040f452444f39d4746e9f8870877c0e16961ddb4c3833e409c3620b", + "chksum_sha256": "049f1ad67c57e019423f28c77ca8cec13e714ae8727fedfde71792ec56131344", "format": 1 }, { - "name": "plugins/modules/podman_logout.py", + "name": "tests/integration/targets/podman_play/tasks/files/play-pod.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7cc7da9cf123ffb9180e98f2fe5704f628831d44014efd25c48cedd1c28a9b7c", + "chksum_sha256": "28fd560a9ff59811770316563e3320dbd77ed04c2c2dd9d698c54870fbcaafb4", "format": 1 }, { - "name": "plugins/modules/podman_load.py", + "name": "tests/integration/targets/podman_play/tasks/files/play1.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "96694bda39431f44186d599db567446d72debdf52a4a5c51f5fd66fa515229fc", + "chksum_sha256": "1031804932a82f741e8cddaa397e73554e4784a790a3d4493d1b5c8f5f6bbf7e", "format": 1 }, { - "name": "plugins/modules/podman_network_info.py", + "name": "tests/integration/targets/podman_play/tasks/files/play-root3.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9beb6e0c733ca304f38f95116dfd89569df21a68428039ef59ec9650314c5222", + "chksum_sha256": "3e26cb69976a1b7d1f79a5dafc74e368d9297bb63b29c1c213d5bbddc0e62bf3", "format": 1 }, { - "name": "plugins/modules/podman_secret.py", + "name": "tests/integration/targets/podman_play/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "28c55a86b5aedc442a0350576feffbbb2e80165a1879997c0f840d62d90de073", + "chksum_sha256": "6e09a063081bc323f0bed0bde99945514ced8f79728cb0e6505cf9830e39210c", "format": 1 }, { - "name": "plugins/modules/podman_containers.py", + "name": "tests/integration/targets/podman_play/tasks/play-with-build.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "aa442d06bccf7f0b786e16f8e02ea12673fafbe7e818b24d7ad901034623b897", + "chksum_sha256": "e69e16e846f4c167878eadf1701af4af637704a1441bf20fb9c05161e93c034f", "format": 1 }, { - "name": "plugins/modules/podman_generate_systemd.py", + "name": "tests/integration/targets/podman_play/tasks/play-with-options.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2d6ef5af7ea3d4e72c9d6cdc726adb00118f4210e9b45d26cd72c5ba9818f2b8", + "chksum_sha256": "0774269b8b1a0fa19000a0c0bfe4bb6ff8410a7fa46b80d1c4876ac39108580c", "format": 1 }, { - "name": "plugins/modules/podman_image.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "d73712ff41ef90113263fd38e69d1aa2f870d4601c8cc7b2d64762a67e1cef2f", + "name": "tests/integration/targets/podman_container", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_volume_info.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "eb8cf9d38d438d24589d547458f4c0ba8341f687eb8a1ded30de1fc0b8933c83", + "name": "tests/integration/targets/podman_container/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_network.py", + "name": "tests/integration/targets/podman_container/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "c8284c79c7def1fa1aaa23e64e7ba2803b30b73493046f23b3fe588f2ebf2002", + "chksum_sha256": "01fca5192bb2072e35c91ce42643accf53cd7cc51166f8845bf71a373e99dd87", "format": 1 }, { - "name": "plugins/modules/podman_prune.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "edf60cce31f68425b42ee1b59349b3f8bdab30ecde8b4dd1e5d27a11bb0c614f", + "name": "tests/integration/targets/podman_secret", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_tag.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "f748d6640b2cd18ac2caaf0a9d74917c1f139649df48dd514a11d8a1e7abc7cf", + "name": "tests/integration/targets/podman_secret/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_container_info.py", + "name": "tests/integration/targets/podman_secret/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "27452b5112988897d7e8320de6d04330eac99cd8309825890fd804259653e073", + "chksum_sha256": "b9b9415b024f3f617149c74d980afccb22e7223dac8bb673465504507ca4e2aa", "format": 1 }, { - "name": "plugins/modules/podman_pod.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "71e72a676932a6088916ee16d8f7e37fd5704c846c1a3020215cadbf60bca940", + "name": "tests/integration/targets/podman_container_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/__init__.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "tests/integration/targets/podman_container_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_image_info.py", + "name": "tests/integration/targets/podman_container_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "d79ccfb526e599404fcb618d04195f8c7fa8158a7cce1f2d5d592b626a6976e2", + "chksum_sha256": "f753b105c6b8ca293911422dc3372b82e98ba5b3f7065cac0a20976933a0c03f", "format": 1 }, { - "name": "plugins/modules/podman_pod_info.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "18e5fd6f6142467654af44f458a13c662d3beb2fa7957b137cbc13852cfcb440", + "name": "tests/integration/targets/podman_import", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_login.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "99408ff731f50c595b25692e2c86e717db2cf0b822d4907ec1f40a1f08856e0b", + "name": "tests/integration/targets/podman_import/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_login_info.py", + "name": "tests/integration/targets/podman_import/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e8f615071a379d21b8f012a60c24036c4812239faf8e6aea2be6e5ca21bbcc4f", + "chksum_sha256": "aee5d8c4cdcd8ca56109a6fcc93be0dcce03ebc65cf6c8d606b1e195ad7bc37a", "format": 1 }, { - "name": "plugins/modules/podman_export.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "5ebdcd00955640510cf639b8920511d34ad2d73e6d8f94d40f4a3f14f71e23f7", + "name": "tests/integration/targets/podman_runlabel", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_volume.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "7ffb53bbf08b1de02211173a8ad1740d2364c2a391dd763f03e67ffba5649b97", + "name": "tests/integration/targets/podman_runlabel/files", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/modules/podman_import.py", + "name": "tests/integration/targets/podman_runlabel/files/testinstall.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cc21e501407e0506176e0b640da1d669c71d90131873ce71ad29f95ed2301d3c", + "chksum_sha256": "6450871e198c27b65e85883b3ca93b78f63261667b2332689d7f5b01fd293077", "format": 1 }, { - "name": "plugins/modules/podman_play.py", + "name": "tests/integration/targets/podman_runlabel/files/Dockerfile", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "56a3fbad4f660316fca29a637b220e9a1e5fb04f1b1f6bee6b8da02a73b5618f", + "chksum_sha256": "4afccdec25a964d39944882c25dbb0df6f0f844cfcfb72bbd89bb505167d1241", "format": 1 }, { - "name": "plugins/module_utils", + "name": "tests/integration/targets/podman_runlabel/tasks", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "plugins/module_utils/podman", + "name": "tests/integration/targets/podman_runlabel/tasks/main.yml", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "0beafe98862363c62951e9c1a1398446a78b4e00aee1c91a7343e38eb5380fb0", + "format": 1 + }, + { + "name": "tests/integration/targets/connection_buildah", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "plugins/module_utils/podman/podman_container_lib.py", + "name": "tests/integration/targets/connection_buildah/test_connection.inventory", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "36c7bf9076966092fa3b52ec875075aea5d63c3df27a62f97b2bc669494e1386", + "chksum_sha256": "5012fc0a2af812b87b675f31cd605ecf8d80fe32667b6ed20ea51fe0c8685742", "format": 1 }, { - "name": "plugins/module_utils/podman/podman_pod_lib.py", + "name": "tests/integration/targets/connection_buildah/runme.sh", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "59a8af45ccf3b543b0432ffdc0f19d6d21c9a9721d2068c23193b33135034be9", + "chksum_sha256": "b4d64b01f03eb7aa81f3fbe7202c816188bc8432fedccb5251feeb330f7c16e4", "format": 1 }, { - "name": "plugins/module_utils/podman/__init__.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "tests/integration/targets/podman_login_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/module_utils/podman/common.py", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "1ec29eac71330e749b86528ed940e632503f7493ce065bc2a75457f924fc9301", + "name": "tests/integration/targets/podman_login_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "plugins/module_utils/__init__.py", + "name": "tests/integration/targets/podman_login_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "chksum_sha256": "21ef50fdd0d92d39240b082c1f9ba3782478e615863d3e8d9a0960b175b8158e", "format": 1 }, { - "name": "changelogs", + "name": "tests/integration/targets/podman_generate_systemd", "ftype": "dir", "chksum_type": null, "chksum_sha256": null, "format": 1 }, { - "name": "changelogs/changelog.yaml", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "7eec5a3e929f818e7edc5a5213ada7646e635ebef41d6faa0c24b131d7b63ee6", + "name": "tests/integration/targets/podman_generate_systemd/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "changelogs/config.yaml", + "name": "tests/integration/targets/podman_generate_systemd/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "72cc16b684890f4595ab75ffdd6f80f5ae19bc84cbb2d82606bc840eb7842209", + "chksum_sha256": "4c4a2b75bf6b0c5816e27b25bd3b7ba836e3d040b606b84f2a15d8f96bfc7ad5", "format": 1 }, { - "name": "SECURITY.md", - "ftype": "file", - "chksum_type": "sha256", - "chksum_sha256": "b73dc04e41dbb3774a3244e8e40d13eb97d169caa3e1230a622e077d60c1edd9", + "name": "tests/integration/targets/podman_network_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, "format": 1 }, { - "name": "COPYING", + "name": "tests/integration/targets/podman_network_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/podman_network_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "chksum_sha256": "5d60cdf4f76199919395dd477e7feb32d8ebbb4b736d0a13052290a3fcb5e5e3", "format": 1 }, { - "name": "setup.py", + "name": "tests/integration/targets/podman_pod_info", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/podman_pod_info/tasks", + "ftype": "dir", + "chksum_type": null, + "chksum_sha256": null, + "format": 1 + }, + { + "name": "tests/integration/targets/podman_pod_info/tasks/main.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "85ef52c56819164efc5178d25aa03a432cdb8431ad0c99255802ce19a1719602", + "chksum_sha256": "f04166aa3908442835ca6e7f747429d54cdeb8bcbf272e3977de79f3ad653271", "format": 1 }, { @@ -1667,24 +1863,24 @@ "format": 1 }, { - "name": "galaxy.yml.in", + "name": "ansible-collection-containers-podman.spec", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ba21f50b97b7f801dd811f96d4941327fccab34b13311e9bfcc5facfeec16999", + "chksum_sha256": "78cf0e2fef0e96de69fd18ab38b358a03a22a5ce2e0ecafbd149407d6bcafb47", "format": 1 }, { - "name": "ansible-collection-containers-podman.spec", + "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "78cf0e2fef0e96de69fd18ab38b358a03a22a5ce2e0ecafbd149407d6bcafb47", + "chksum_sha256": "0b3c0bf86d855ce3b4341bf6f72a5ea3e6300c09ca88d793ca3b149175eaa30c", "format": 1 }, { - "name": "setup.cfg", + "name": "galaxy.yml.in", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "df77e31936daa4f2509685b9442e8518931651064d466d9f6e0b597ebf92d6cd", + "chksum_sha256": "ba21f50b97b7f801dd811f96d4941327fccab34b13311e9bfcc5facfeec16999", "format": 1 } ], diff --git a/ansible_collections/containers/podman/MANIFEST.json b/ansible_collections/containers/podman/MANIFEST.json index 375557c50..42a7515a2 100644 --- a/ansible_collections/containers/podman/MANIFEST.json +++ b/ansible_collections/containers/podman/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "containers", "name": "podman", - "version": "1.10.2", + "version": "1.12.0", "authors": [ "Sagi Shnaidman ", "Ansible team" @@ -28,7 +28,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6cfa4c09919ad4148a3f047e6205cb019dbb080b11b94a7d4b2b61c6cb0f948f", + "chksum_sha256": "b77266449f88b742113a208a520a3141a8e68154485dde86e743014eb8d58d58", "format": 1 }, "format": 1 diff --git a/ansible_collections/containers/podman/changelogs/changelog.yaml b/ansible_collections/containers/podman/changelogs/changelog.yaml index db29bf897..05857773e 100644 --- a/ansible_collections/containers/podman/changelogs/changelog.yaml +++ b/ansible_collections/containers/podman/changelogs/changelog.yaml @@ -183,6 +183,80 @@ releases: - podman_systemd - Ignore header when comparing systemd files content release_summary: Bugfixes and docs changes release_date: '2023-05-31' + 1.10.3: + changes: + bugfixes: + - podman_container - Add diff and change detection to systemd generation + - podman_container - Add example with quotes in command to docs + - podman_container - Fix healthcheck issue where defined in image + - podman_container - Fix idempoency issue with PID of container + - podman_container - Fix idempotency for RestartPolicy when MaximumRetryCount + - podman_container - Fix idempotency for devices + - podman_container - Fixed idempotency with cpus parameter + - podman_container - Improve docs about container env_file on remote machine + - podman_container - added cpu_quota parameter to podman_container + - podman_export,podman_import - Adding volume import and export option + - podman_generate_systemd - Add a force field to podman_generate_systemd + - podman_image - Add restart-sec and other options to systemd generation + - podman_image - Fix pulling short image name + release_summary: Bugfixes and new options for modules + release_date: '2023-08-15' + 1.10.4: + changes: + bugfixes: + - Fix common file for Python 2.7 + - podman_network - Do not force network removal by default + - podman_network - Fix network DNS enable idempotency issue + - podman_pod - Fix idempotency when running inside Podman container + minor_changes: + - podman_container - Add support for health-on-failure action + - podman_image -Add target support for podman build image + - podman_play - Add build and context_dir option to podman_play + - podman_pod - Add options for resource limits to podman_pod + release_summary: Bugfixes and new modules + modules: + - description: Executes a command in a running container + name: podman_container_exec + namespace: '' + - description: Run given label from given image + name: podman_runlabel + namespace: '' + release_date: '2023-11-01' + 1.11.0: + changes: + minor_changes: + - Update docs + release_date: '2023-11-05' + 1.12.0: + changes: + bugfixes: + - Add idempotency for podman_secret module + - Catch exceptions when no JSON output in podman_image + - Fail if systemd generation failed and it's explicitly set + - Fix example name + - Fix idempotency for podman_network + - Fix idempotency when using 0.0.0.0 in ports + - Fix multi-image support for podman_save + - Fix volume inspection by name in podman_volume + - Recreate stopped containers if recreate flag is enabled + minor_changes: + - Add log_opt and annotaion options to podman_play module + - Add option to parse CreateCommand easily for diff calc + - Add support for setting underlying interface in podman_network + - Alias generate systemd options stop_timeout and time + - Fix CI rootfs for podman_container + - Fix broken conmon version in CI install + - Improve security_opt comparison between existing container + - podman_container - Add new arguments to podman status commands + - podman_container - Update env_file to accept a list of files instead of a + single file + - podman_secret_info - Add secrets info module + release_summary: New podman_secret_info module, improvements and bugfixes + modules: + - description: Secrets info module + name: podman_secret_info + namespace: '' + release_date: '2024-01-30' 1.2.0: changes: minor_changes: @@ -411,7 +485,7 @@ releases: - Don't add newlines to secrets - Fix issue with podman and exposed ports - Fix signal diff for truncated and RT signal names - - Support empty stings in prefixes + - Support empty strings in prefixes - Update error message when pull set to false release_summary: Fixes for various modules release_date: '2021-11-09' diff --git a/ansible_collections/containers/podman/docs/_static/alabaster.css b/ansible_collections/containers/podman/docs/_static/alabaster.css index 0eddaeb07..517d0b29c 100644 --- a/ansible_collections/containers/podman/docs/_static/alabaster.css +++ b/ansible_collections/containers/podman/docs/_static/alabaster.css @@ -419,7 +419,9 @@ table.footnote td { } dl { - margin: 0; + margin-left: 0; + margin-right: 0; + margin-top: 0; padding: 0; } diff --git a/ansible_collections/containers/podman/docs/_static/antsibull-minimal.css b/ansible_collections/containers/podman/docs/_static/antsibull-minimal.css index 6f2872704..3b17984c1 100644 --- a/ansible_collections/containers/podman/docs/_static/antsibull-minimal.css +++ b/ansible_collections/containers/podman/docs/_static/antsibull-minimal.css @@ -1,2 +1,3 @@ @charset "UTF-8"; -/* Copyright (c) Ansible and contributors */table.documentation-table{border-bottom:1px solid #000;border-right:1px solid #000}table.documentation-table td,table.documentation-table th{padding:4px;border-left:1px solid #000;border-top:1px solid #000}table.documentation-table td.elbow-placeholder{border-left:1px solid #000;border-top:0;width:30px;min-width:30px}table.documentation-table td{vertical-align:top}table.documentation-table td:first-child{white-space:nowrap}table.documentation-table .value-type{font-size:x-small;color:purple;display:inline}table.documentation-table .value-separator{font-size:x-small;display:inline}table.documentation-table .value-required{font-size:x-small;color:red;display:inline}table.documentation-table tr .ansibleOptionLink{display:inline-block;visibility:hidden}table.documentation-table tr .ansibleOptionLink:after{content:"🔗"}table.documentation-table tr:hover .ansibleOptionLink:after{visibility:visible} \ No newline at end of file +/* Copyright (c) Ansible and contributors */ +/* GNU General Public License v3.0+ (see https://www.gnu.org/licenses/gpl-3.0.txt) */.ansible-links{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.ansible-links>*{margin:2px 4px!important}.ansible-links>li{list-style:none!important}.ansible-links>li>p{display:inline}.ansible-links a{display:block;padding:4px 12px;cursor:pointer;border-radius:3px;background-color:#5bbdbf;color:#fff}.ansible-links a:active,.ansible-links a:focus,.ansible-links a:hover{background-color:#91d9db}.ansible-links a:focus{outline:3px solid #204748}table.documentation-table{border-bottom:1px solid #000;border-right:1px solid #000}table.documentation-table th{background-color:#6ab0de}table.documentation-table td,table.documentation-table th{padding:4px;border-left:1px solid #000;border-top:1px solid #000}table.documentation-table td.elbow-placeholder{border-top:0;width:30px;min-width:30px}table.documentation-table td{vertical-align:top}table.documentation-table td:first-child{white-space:nowrap}table.documentation-table tr .ansibleOptionLink{display:inline-block}table.documentation-table tr .ansibleOptionLink:after{content:"🔗";opacity:0}table.documentation-table tr:hover .ansibleOptionLink:after{opacity:1}table.documentation-table tr:nth-child(odd){background-color:#fff}table.documentation-table tr:nth-child(2n){background-color:#e7f2fa}table.ansible-option-table{display:table;border-color:#000!important;height:1px}table.ansible-option-table tr{height:100%}table.ansible-option-table td,table.ansible-option-table th{border-color:#000!important;border-bottom:none!important;vertical-align:top!important}table.ansible-option-table th>p{font-size:medium!important}table.ansible-option-table thead tr{background-color:#6ab0de}table.ansible-option-table tbody .row-odd td{background-color:#fff!important}table.ansible-option-table tbody .row-even td{background-color:#e7f2fa!important}table.ansible-option-table ul>li>p{margin:0!important}table.ansible-option-table ul>li>div[class^=highlight]{margin-bottom:4px!important}table.ansible-option-table p.ansible-option-title{display:inline}table.ansible-option-table .ansible-option-type-line{font-size:small;margin-bottom:0}table.ansible-option-table .ansible-option-elements,table.ansible-option-table .ansible-option-type{color:purple}table.ansible-option-table .ansible-option-required{color:red}table.ansible-option-table .ansible-option-versionadded{font-size:small;color:#006400}table.ansible-option-table .ansible-option-aliases{color:#006400;white-space:normal}table.ansible-option-table .ansible-option-line{margin-top:8px}table.ansible-option-table .ansible-option-choices-default-mark,table.ansible-option-table .ansible-option-default,table.ansible-option-table .ansible-option-default-bold{color:#00f}table.ansible-option-table .ansible-option-sample{color:#00f;word-wrap:break-word;word-break:break-all}table.ansible-option-table .ansible-option-sample-bold{color:#000}table.ansible-option-table .ansible-attribute-support-none{color:red}table.ansible-option-table .ansible-attribute-support-partial{color:#a5a500}table.ansible-option-table .ansible-attribute-support-full{color:green}table.ansible-option-table .ansibleOptionLink{display:inline-block}table.ansible-option-table .ansibleOptionLink:after{content:"🔗";opacity:0}table.ansible-option-table p{margin:0 0 8px}table.ansible-option-table tr:hover .ansibleOptionLink:after{opacity:1}table.ansible-option-table td{padding:0!important;white-space:normal}table.ansible-option-table td>div.ansible-option-cell{padding:8px 16px;border-top:1px solid #000}table.ansible-option-table td:first-child{height:inherit;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}table.ansible-option-table td:first-child>div.ansible-option-cell{height:inherit;-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;white-space:nowrap;max-width:100%}table.ansible-option-table .ansible-option-indent{margin-left:2em;border-right:1px solid #000}table.ansible-option-table .ansible-attribute-support-label{display:none}@media (max-width:1200px){table.ansible-option-table{display:block;height:unset;border:none!important}table.ansible-option-table thead{display:none}table.ansible-option-table tbody,table.ansible-option-table td,table.ansible-option-table tr{display:block;border:none!important}table.ansible-option-table tbody .row-even td,table.ansible-option-table tbody .row-odd td{background-color:unset!important}table.ansible-option-table td>div.ansible-option-cell{border-top:none}table.ansible-option-table td:first-child>div.ansible-option-cell{background-color:#e7f2fa!important}table.ansible-option-table td:not(:first-child){display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}table.ansible-option-table td:not(:first-child)>div.ansible-option-cell{margin-left:1em}table.ansible-option-table .ansible-option-indent,table.ansible-option-table .ansible-option-indent-desc{margin-left:1em;border:none;border-right:3px solid #e7f2fa}table.ansible-option-table .ansible-attribute-support-label{display:unset}}.ansible-version-added{font-style:italic}.ansible-option-value a.reference.external,.ansible-option-value a.reference.external:hover,.ansible-option-value a.reference.internal,.ansible-option-value a.reference.internal:hover,.ansible-option a.reference.external,.ansible-option a.reference.external:hover,.ansible-option a.reference.internal,.ansible-option a.reference.internal:hover,.ansible-return-value a.reference.external,.ansible-return-value a.reference.external:hover,.ansible-return-value a.reference.internal,.ansible-return-value a.reference.internal:hover{color:unset} \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/_static/basic.css b/ansible_collections/containers/podman/docs/_static/basic.css index 7d5974c32..7577acb1a 100644 --- a/ansible_collections/containers/podman/docs/_static/basic.css +++ b/ansible_collections/containers/podman/docs/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -236,16 +236,6 @@ div.body p, div.body dd, div.body li, div.body blockquote { a.headerlink { visibility: hidden; } -a.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - h1:hover > a.headerlink, h2:hover > a.headerlink, @@ -334,11 +324,17 @@ aside.sidebar { p.sidebar-title { font-weight: bold; } + +nav.contents, +aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, div.topic { border: 1px solid #ccc; padding: 7px; @@ -377,6 +373,8 @@ div.body p.centered { div.sidebar > :last-child, aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; @@ -384,6 +382,8 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, +nav.contents::after, +aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { @@ -609,25 +609,6 @@ ul.simple p { margin-bottom: 0; } -/* Docutils 0.17 and older (footnotes & citations) */ -dl.footnote > dt, -dl.citation > dt { - float: left; - margin-right: 0.5em; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd:after { - content: ""; - clear: both; -} - -/* Docutils 0.18+ (footnotes & citations) */ aside.footnote > span, div.citation > span { float: left; @@ -652,8 +633,6 @@ div.citation > p:last-of-type:after { clear: both; } -/* Footnotes & citations ends */ - dl.field-list { display: grid; grid-template-columns: fit-content(30%) auto; @@ -666,10 +645,6 @@ dl.field-list > dt { padding-right: 5px; } -dl.field-list > dt:after { - content: ":"; -} - dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; diff --git a/ansible_collections/containers/podman/docs/_static/doctools.js b/ansible_collections/containers/podman/docs/_static/doctools.js index c3db08d1c..d06a71d75 100644 --- a/ansible_collections/containers/podman/docs/_static/doctools.js +++ b/ansible_collections/containers/podman/docs/_static/doctools.js @@ -4,12 +4,19 @@ * * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ "use strict"; +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + const _ready = (callback) => { if (document.readyState !== "loading") { callback(); @@ -18,73 +25,11 @@ const _ready = (callback) => { } }; -/** - * highlight a given string on a node by wrapping it in - * span elements with the given class name. - */ -const _highlight = (node, addItems, text, className) => { - if (node.nodeType === Node.TEXT_NODE) { - const val = node.nodeValue; - const parent = node.parentNode; - const pos = val.toLowerCase().indexOf(text); - if ( - pos >= 0 && - !parent.classList.contains(className) && - !parent.classList.contains("nohighlight") - ) { - let span; - - const closestNode = parent.closest("body, svg, foreignObject"); - const isInSVG = closestNode && closestNode.matches("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.classList.add(className); - } - - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - parent.insertBefore( - span, - parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling - ) - ); - node.nodeValue = val.substr(0, pos); - - if (isInSVG) { - const rect = document.createElementNS( - "http://www.w3.org/2000/svg", - "rect" - ); - const bbox = parent.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute("class", className); - addItems.push({ parent: parent, target: rect }); - } - } - } else if (node.matches && !node.matches("button, select, textarea")) { - node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); - } -}; -const _highlightText = (thisNode, text, className) => { - let addItems = []; - _highlight(thisNode, addItems, text, className); - addItems.forEach((obj) => - obj.parent.insertAdjacentElement("beforebegin", obj.target) - ); -}; - /** * Small JavaScript module for the documentation. */ const Documentation = { init: () => { - Documentation.highlightSearchWords(); Documentation.initDomainIndexTable(); Documentation.initOnKeyListeners(); }, @@ -126,51 +71,6 @@ const Documentation = { Documentation.LOCALE = catalog.locale; }, - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords: () => { - const highlight = - new URLSearchParams(window.location.search).get("highlight") || ""; - const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); - if (terms.length === 0) return; // nothing to do - - // There should never be more than one element matching "div.body" - const divBody = document.querySelectorAll("div.body"); - const body = divBody.length ? divBody[0] : document.querySelector("body"); - window.setTimeout(() => { - terms.forEach((term) => _highlightText(body, term, "highlighted")); - }, 10); - - const searchBox = document.getElementById("searchbox"); - if (searchBox === null) return; - searchBox.appendChild( - document - .createRange() - .createContextualFragment( - '" - ) - ); - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords: () => { - document - .querySelectorAll("#searchbox .highlight-link") - .forEach((el) => el.remove()); - document - .querySelectorAll("span.highlighted") - .forEach((el) => el.classList.remove("highlighted")); - const url = new URL(window.location); - url.searchParams.delete("highlight"); - window.history.replaceState({}, "", url); - }, - /** * helper function to focus on search bar */ @@ -210,15 +110,11 @@ const Documentation = { ) return; - const blacklistedElements = new Set([ - "TEXTAREA", - "INPUT", - "SELECT", - "BUTTON", - ]); document.addEventListener("keydown", (event) => { - if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements - if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; if (!event.shiftKey) { switch (event.key) { @@ -240,10 +136,6 @@ const Documentation = { event.preventDefault(); } break; - case "Escape": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.hideSearchWords(); - event.preventDefault(); } } diff --git a/ansible_collections/containers/podman/docs/_static/documentation_options.js b/ansible_collections/containers/podman/docs/_static/documentation_options.js index a750e4d5e..b57ae3b83 100644 --- a/ansible_collections/containers/podman/docs/_static/documentation_options.js +++ b/ansible_collections/containers/podman/docs/_static/documentation_options.js @@ -10,5 +10,5 @@ var DOCUMENTATION_OPTIONS = { SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, SHOW_SEARCH_SUMMARY: true, - ENABLE_SEARCH_SHORTCUTS: false, + ENABLE_SEARCH_SHORTCUTS: true, }; \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/_static/language_data.js b/ansible_collections/containers/podman/docs/_static/language_data.js index 2e22b06ab..250f5665f 100644 --- a/ansible_collections/containers/podman/docs/_static/language_data.js +++ b/ansible_collections/containers/podman/docs/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/ansible_collections/containers/podman/docs/_static/pygments.css b/ansible_collections/containers/podman/docs/_static/pygments.css index 87f8bd121..9abe04ba5 100644 --- a/ansible_collections/containers/podman/docs/_static/pygments.css +++ b/ansible_collections/containers/podman/docs/_static/pygments.css @@ -54,6 +54,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #000000 } /* Name.Variable */ .highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */ +.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ .highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ .highlight .mb { color: #990000 } /* Literal.Number.Bin */ .highlight .mf { color: #990000 } /* Literal.Number.Float */ diff --git a/ansible_collections/containers/podman/docs/_static/searchtools.js b/ansible_collections/containers/podman/docs/_static/searchtools.js index ac4d5861f..97d56a74d 100644 --- a/ansible_collections/containers/podman/docs/_static/searchtools.js +++ b/ansible_collections/containers/podman/docs/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -57,14 +57,14 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, highlightTerms, searchTerms) => { +const _displayItem = (item, searchTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - const [docName, title, anchor, descr] = item; + const [docName, title, anchor, descr, score, _filename] = item; let listItem = document.createElement("li"); let requestUrl; @@ -82,13 +82,12 @@ const _displayItem = (item, highlightTerms, searchTerms) => { requestUrl = docUrlRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } - const params = new URLSearchParams(); - params.set("highlight", [...highlightTerms].join(" ")); let linkEl = listItem.appendChild(document.createElement("a")); - linkEl.href = linkUrl + "?" + params.toString() + anchor; + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; linkEl.innerHTML = title; if (descr) - listItem.appendChild(document.createElement("span")).innerText = + listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; else if (showSearchSummary) fetch(requestUrl) @@ -96,7 +95,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, highlightTerms) + Search.makeSearchSummary(data, searchTerms) ); }); Search.output.appendChild(listItem); @@ -116,15 +115,14 @@ const _finishSearch = (resultCount) => { const _displayNextItem = ( results, resultCount, - highlightTerms, searchTerms ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), highlightTerms, searchTerms); + _displayItem(results.pop(), searchTerms); setTimeout( - () => _displayNextItem(results, resultCount, highlightTerms, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms), 5 ); } @@ -155,10 +153,8 @@ const Search = { _pulse_status: -1, htmlToText: (htmlString) => { - const htmlElement = document - .createRange() - .createContextualFragment(htmlString); - _removeChildren(htmlElement.querySelectorAll(".headerlink")); + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); const docContent = htmlElement.querySelector('[role="main"]'); if (docContent !== undefined) return docContent.textContent; console.warn( @@ -239,6 +235,12 @@ const Search = { * execute search (requires search index to be loaded) */ query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -266,6 +268,10 @@ const Search = { } }); + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + // console.debug("SEARCH: searching for:"); // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); @@ -274,6 +280,40 @@ const Search = { let results = []; _removeChildren(document.getElementById("search-progress")); + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + // lookup as object objectTerms.forEach((term) => results.push(...Search.performObjectSearch(term, objectTerms)) @@ -320,7 +360,7 @@ const Search = { // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, highlightTerms, searchTerms); + _displayNextItem(results, results.length, searchTerms); }, /** @@ -401,8 +441,8 @@ const Search = { // prepare search const terms = Search._index.terms; const titleTerms = Search._index.titleterms; - const docNames = Search._index.docnames; const filenames = Search._index.filenames; + const docNames = Search._index.docnames; const titles = Search._index.titles; const scoreMap = new Map(); @@ -499,16 +539,15 @@ const Search = { /** * helper function to return a node containing the * search summary for a given text. keywords is a list - * of stemmed words, highlightWords is the list of normal, unstemmed - * words. the first one is used to find the occurrence, the - * latter for highlighting it. + * of stemmed words. */ - makeSearchSummary: (htmlText, keywords, highlightWords) => { - const text = Search.htmlToText(htmlText).toLowerCase(); + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); if (text === "") return null; + const textLower = text.toLowerCase(); const actualStartPosition = [...keywords] - .map((k) => text.indexOf(k.toLowerCase())) + .map((k) => textLower.indexOf(k.toLowerCase())) .filter((i) => i > -1) .slice(-1)[0]; const startWithContext = Math.max(actualStartPosition - 120, 0); @@ -516,13 +555,9 @@ const Search = { const top = startWithContext === 0 ? "" : "..."; const tail = startWithContext + 240 < text.length ? "..." : ""; - let summary = document.createElement("div"); + let summary = document.createElement("p"); summary.classList.add("context"); - summary.innerText = top + text.substr(startWithContext, 240).trim() + tail; - - highlightWords.forEach((highlightWord) => - _highlightText(summary, highlightWord, "highlighted") - ); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; return summary; }, diff --git a/ansible_collections/containers/podman/docs/_static/sphinx_highlight.js b/ansible_collections/containers/podman/docs/_static/sphinx_highlight.js new file mode 100644 index 000000000..aae669d7e --- /dev/null +++ b/ansible_collections/containers/podman/docs/_static/sphinx_highlight.js @@ -0,0 +1,144 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/ansible_collections/containers/podman/docs/buildah_connection.html b/ansible_collections/containers/podman/docs/buildah_connection.html index e0df468d9..0d16691d4 100644 --- a/ansible_collections/containers/podman/docs/buildah_connection.html +++ b/ansible_collections/containers/podman/docs/buildah_connection.html @@ -1,21 +1,22 @@ - - - containers.podman.buildah – Interact with an existing buildah container — Python documentation + + + + containers.podman.buildah connection – Interact with an existing buildah container — Python documentation - - - + + + @@ -32,93 +33,89 @@
-
-

containers.podman.buildah – Interact with an existing buildah container

+
+

containers.podman.buildah connection – Interact with an existing buildah container

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This connection plugin is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman.

To use it in a playbook, specify: containers.podman.buildah.

- -
-

Synopsis

+ +
+

Synopsis

  • Run commands or put/fetch files to an existing container using buildah tool.

+
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

remote_addr

+

string

+

The ID of the container you want to access.

+

Default: "inventory_hostname"

+

Configuration:

+
    +
  • Variable: ansible_host

  • +
  • Variable: inventory_hostname

  • +
+
+

remote_user

+

string

+

User specified via name or ID which is used to execute commands inside the container.

+

Configuration:

+
    +
  • INI entry:

    +
    [defaults]
    +remote_user = VALUE
    +
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    ParameterChoices/DefaultsConfigurationComments
    -
    - remote_addr - -
    - string -
    -
    - Default:
    "inventory_hostname"
    -
    -
    - var: ansible_host -
    -
    -
    The ID of the container you want to access.
    -
    -
    - remote_user - -
    - string -
    -
    - -
    ini entries: -

    - [defaults]
    remote_user = None -

    -
    -
    - env:ANSIBLE_REMOTE_USER -
    -
    - var: ansible_user -
    -
    -
    User specified via name or ID which is used to execute commands inside the container.
    -
    -
    +
  • +
  • Environment variable: ANSIBLE_REMOTE_USER

  • +
  • Variable: ansible_user

  • +
+
+

Authors

  • Tomas Tomecek (@TomasTomecek)

+
+

Hint

+

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.

-
-
+ + + +
@@ -137,11 +134,48 @@

Navigation

+ + + @@ -171,8 +205,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | + + + + + + + + Index of all Collection Environment Variables — Python documentation + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Index of all Collection Environment Variables

+

The following index documents all environment variables declared by plugins in collections. +Environment variables used by the ansible-core configuration are documented in ansible_configuration_settings.

+
+
+ANSIBLE_BECOME_PASS
+

Password to pass to sudo

+

Used by: +containers.podman.podman_unshare become plugin

+
+ +
+
+ANSIBLE_PODMAN_EXECUTABLE
+

Executable for podman command.

+

Used by: +containers.podman.podman connection plugin

+
+ +
+
+ANSIBLE_PODMAN_EXTRA_ARGS
+

Extra arguments to pass to the podman command line.

+

Used by: +containers.podman.podman connection plugin

+
+ +
+
+ANSIBLE_SUDO_EXE
+

Sudo executable

+

Used by: +containers.podman.podman_unshare become plugin

+
+ +
+
+ANSIBLE_SUDO_PASS
+

Password to pass to sudo

+

Used by: +containers.podman.podman_unshare become plugin

+
+ +
+
+ANSIBLE_SUDO_USER
+

User you ‘become’ to execute the task (‘root’ is not a valid value here).

+

Used by: +containers.podman.podman_unshare become plugin

+
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/genindex.html b/ansible_collections/containers/podman/docs/genindex.html index 93bf0742d..312e433c8 100644 --- a/ansible_collections/containers/podman/docs/genindex.html +++ b/ansible_collections/containers/podman/docs/genindex.html @@ -1,4 +1,3 @@ - @@ -10,10 +9,8 @@ - - - + @@ -36,8 +33,65 @@

Index

+ A + | E
+

A

+ + + +
+ +

E

+ + +
+ @@ -56,6 +110,41 @@

Navigation

+ + +

Related Topics

@@ -90,8 +179,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13
diff --git a/ansible_collections/containers/podman/docs/index.html b/ansible_collections/containers/podman/docs/index.html index 8ded11c9a..ec765ccb4 100644 --- a/ansible_collections/containers/podman/docs/index.html +++ b/ansible_collections/containers/podman/docs/index.html @@ -1,21 +1,21 @@ - - + + + Containers.Podman — Python documentation - - - + + @@ -32,60 +32,89 @@
-
+

Containers.Podman

-

Collection version 1.10.1

-
-
-
-

Plugin Index

-

These are the plugins in the containers.podman collection

-
-

Become Plugins

+

Collection version 1.11.0

+
-
-

Connection Plugins

+ +
+

Description

+

Podman container Ansible modules

+

Authors:

    -
  • buildah – Interact with an existing buildah container

  • -
  • podman – Interact with an existing podman container

  • +
  • Sagi Shnaidman <sshnaidm@redhat.com>

  • +
  • Ansible team

+

Supported ansible-core versions:

+
    +
  • 2.8 or newer

  • +
+ +
-
+
+
+

Plugin Index

+

These are the plugins in the containers.podman collection:

+

Modules

-
-

See also

-

List of collections with docs hosted here.

-
+
+
+
+

Become Plugins

+ +
+
+
+

Connection Plugins

+ +
+
+
+
@@ -104,11 +133,47 @@

Navigation

+ + + @@ -138,8 +203,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman – Interact with an existing podman container — Python documentation + + + + containers.podman.podman connection – Interact with an existing podman container — Python documentation - - - + + @@ -32,152 +32,122 @@
-
-

containers.podman.podman – Interact with an existing podman container

+
+

containers.podman.podman connection – Interact with an existing podman container

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This connection plugin is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman.

To use it in a playbook, specify: containers.podman.podman.

- -
-

Synopsis

+ +
+

Synopsis

  • Run commands or put/fetch files to an existing container using podman tool.

+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

podman_executable

+

string

+

Executable for podman command.

+

Default: "podman"

+

Configuration:

+ +
+

podman_extra_args

+

string

+

Extra arguments to pass to the podman command line.

+

Default: ""

+

Configuration:

+
    +
  • INI entry:

    +
    [defaults]
    +podman_extra_args = ""
    +
    +
    +
  • +
  • Environment variable: ANSIBLE_PODMAN_EXTRA_ARGS

  • +
  • Variable: ansible_podman_extra_args

  • +
+
+

remote_addr

+

string

+

The ID of the container you want to access.

+

Default: "inventory_hostname"

+

Configuration:

+
    +
  • Variable: ansible_host

  • +
  • Variable: inventory_hostname

  • +
  • Variable: ansible_podman_host

  • +
+
+

remote_user

+

string

+

User specified via name or UID which is used to execute commands inside the container. If you specify the user via UID, you must set ANSIBLE_REMOTE_TMP to a path that exits inside the container and is writable by Ansible.

+

Configuration:

+
    +
  • INI entry:

    +
    [defaults]
    +remote_user = VALUE
    +
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ParameterChoices/DefaultsConfigurationComments
    -
    - podman_executable - -
    - string -
    -
    - Default:
    "podman"
    -
    -
    - env:ANSIBLE_PODMAN_EXECUTABLE -
    -
    - var: ansible_podman_executable -
    -
    -
    Executable for podman command.
    -
    -
    - podman_extra_args - -
    - string -
    -
    - Default:
    ""
    -
    -
    ini entries: -

    - [defaults]
    podman_extra_args = -

    -
    -
    - env:ANSIBLE_PODMAN_EXTRA_ARGS -
    -
    - var: ansible_podman_extra_args -
    -
    -
    Extra arguments to pass to the podman command line.
    -
    -
    - remote_addr - -
    - string -
    -
    - Default:
    "inventory_hostname"
    -
    -
    - var: ansible_host -
    -
    - var: inventory_hostname -
    -
    - var: ansible_podman_host -
    -
    -
    The ID of the container you want to access.
    -
    -
    - remote_user - -
    - string -
    -
    - -
    ini entries: -

    - [defaults]
    remote_user = None -

    -
    -
    - env:ANSIBLE_REMOTE_USER -
    -
    - var: ansible_user -
    -
    -
    User specified via name or UID which is used to execute commands inside the container. If you specify the user via UID, you must set ANSIBLE_REMOTE_TMP to a path that exits inside the container and is writable by Ansible.
    -
    -
    +
  • +
  • Environment variable: ANSIBLE_REMOTE_USER

  • +
  • Variable: ansible_user

  • +
+
+

Authors

  • Tomas Tomecek (@TomasTomecek)

+
+

Hint

+

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.

-
-
+ + + +
@@ -196,11 +166,47 @@

Navigation

+ + + @@ -230,8 +236,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | + + + + + + + + containers.podman.podman_container_exec module – Executes a command in a running container. — Python documentation + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

containers.podman.podman_container_exec module – Executes a command in a running container.

+
+

Note

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

+

To use it in a playbook, specify: containers.podman.podman_container_exec.

+
+ +
+

Synopsis

+
    +
  • Executes a command in a running container.

  • +
+
+
+

Requirements

+

The below requirements are needed on the host that executes this module.

+
    +
  • podman

  • +
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

argv

+

list / elements=string

+

Passes the command as a list rather than a string.

+

One of the command or args is required.

+
+

command

+

string

+

The command to run in the container.

+

One of the command or args is required.

+
+

detach

+

boolean

+

If true, the command runs in the background.

+

The exec session is automatically removed when it completes.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

env

+

dictionary

+

Set environment variables.

+
+

name

+

string / required

+

Name of the container where the command is executed.

+
+

privileged

+

boolean

+

Give extended privileges to the container.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

tty

+

boolean

+

Allocate a pseudo-TTY.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

user

+

string

+

The username or UID used and, optionally, the groupname or GID for the specified command.

+

Both user and group may be symbolic or numeric.

+
+

workdir

+

string

+

Working directory inside the container.

+
+
+
+

Notes

+
+

Note

+ +
+
+
+

Examples

+
- name: Execute a command with workdir
+  containers.podman.podman_container_exec:
+    name: ubi8
+    command: "cat redhat-release"
+    workdir: /etc
+
+- name: Execute a command with a list of args and environment variables
+  containers.podman.podman_container_exec:
+    name: test_container
+    argv:
+      - /bin/sh
+      - -c
+      - echo $HELLO $BYE
+    env:
+      HELLO: hello world
+      BYE: goodbye world
+
+- name: Execute command in background by using detach
+  containers.podman.podman_container_exec:
+    name: detach_container
+    command: "cat redhat-release"
+    detach: true
+
+
+
+
+

Return Values

+

Common return values are documented here, the following are the fields unique to this module:

+ + + + + + + + + + + + + + + + + + + + +

Key

Description

+

exec_id

+

string

+

The ID of the exec session.

+

Returned: success and detach=true

+

Sample: "f99002e34c1087fd1aa08d5027e455bf7c2d6b74f019069acf6462a96ddf2a47"

+
+

rc

+

integer

+

The exit code of the command executed in the container.

+

Returned: success

+

Sample: 0

+
+

stderr

+

string

+

The standard output of the command executed in the container.

+

Returned: success

+
+

stdout

+

string

+

The standard output of the command executed in the container.

+

Returned: success

+
+
+

Authors

+
    +
  • Takuya Nishimura (@nishipy)

  • +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/podman_container_info_module.html b/ansible_collections/containers/podman/docs/podman_container_info_module.html index 806352e28..ff1441845 100644 --- a/ansible_collections/containers/podman/docs/podman_container_info_module.html +++ b/ansible_collections/containers/podman/docs/podman_container_info_module.html @@ -1,21 +1,22 @@ - - - containers.podman.podman_container_info – Gather facts about containers using podman — Python documentation + + + + containers.podman.podman_container_info module – Gather facts about containers using podman — Python documentation - - - + + + @@ -32,15 +33,19 @@
-
-

containers.podman.podman_container_info – Gather facts about containers using podman

+
+

containers.podman.podman_container_info module – Gather facts about containers using podman

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_container_info.

-
+
-
-

Synopsis

+ +
+

Synopsis

  • Gather facts about containers using podman

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- name - -
- list - / elements=string
-
- -
List of container names to gather facts about. If no name is given return facts about all containers.
-
-
-
-

Notes

+ +
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

name

+

list / elements=string

+

List of container names to gather facts about. If no name is given return facts about all containers.

+
+
+
+

Notes

Note

  • Podman may require elevated privileges in order to run properly.

-
-
-

Examples

-
- name: Gather facts for all containers
-  containers.podman.podman_container_info:
-
-- name: Gather facts on a specific container
-  containers.podman.podman_container_info:
-    name: web1
-
-- name: Gather facts on several containers
-  containers.podman.podman_container_info:
-    name:
-      - redis
-      - web1
+
+
+

Examples

+
- name: Gather facts for all containers
+  containers.podman.podman_container_info:
+
+- name: Gather facts on a specific container
+  containers.podman.podman_container_info:
+    name: web1
+
+- name: Gather facts on several containers
+  containers.podman.podman_container_info:
+    name:
+      - redis
+      - web1
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- containers - -
- list - / elements=dictionary
-
always -
Facts from all or specificed containers
-
-
Sample:
-
[{'AppArmorProfile': '', 'Args': ['--single-child', '--', 'kolla_start'], 'BoundingCaps': ['CAP_CHOWN', 'CAP_DAC_OVERRIDE', 'CAP_FSETID', 'CAP_FOWNER', 'CAP_MKNOD', 'CAP_NET_RAW', 'CAP_SETGID', 'CAP_SETUID', 'CAP_SETFCAP', 'CAP_SETPCAP', 'CAP_NET_BIND_SERVICE', 'CAP_SYS_CHROOT', 'CAP_KILL', 'CAP_AUDIT_WRITE'], 'Config': {'Annotations': {'io.kubernetes.cri-o.ContainerType': 'sandbox', 'io.kubernetes.cri-o.TTY': 'false', 'io.podman.annotations.autoremove': 'FALSE', 'io.podman.annotations.init': 'FALSE', 'io.podman.annotations.privileged': 'FALSE', 'io.podman.annotations.publish-all': 'FALSE'}, 'AttachStderr': False, 'AttachStdin': False, 'AttachStdout': False, 'Cmd': ['kolla_start'], 'Domainname': '', 'Entrypoint': 'dumb-init --single-child --', 'Env': ['PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'TERM=xterm', 'HOSTNAME=', 'container=oci', 'KOLLA_INSTALL_METATYPE=rdo', 'KOLLA_BASE_DISTRO=centos', 'KOLLA_INSTALL_TYPE=binary', 'KOLLA_DISTRO_PYTHON_VERSION=2.7', 'KOLLA_BASE_ARCH=x86_64'], 'Hostname': 'c5c39e813703', 'Image': 'docker.io/tripleomaster/centos-haproxy:latest', 'Labels': {'build-date': '20190919', 'kolla_version': '8.1.0', 'name': 'haproxy', 'org.label-schema.build-date': '20190801', 'org.label-schema.license': 'GPLv2', 'org.label-schema.name': 'CentOS Base Image', 'org.label-schema.schema-version': '1.0', 'org.label-schema.vendor': 'CentOS'}, 'OnBuild': None, 'OpenStdin': False, 'StdinOnce': False, 'StopSignal': 15, 'Tty': False, 'User': '', 'Volumes': None, 'WorkingDir': '/'}, 'Created': '2019-10-01T12:51:00.233106443Z', 'Dependencies': [], 'Driver': 'overlay', 'EffectiveCaps': ['CAP_CHOWN', 'CAP_DAC_OVERRIDE', 'CAP_FSETID', 'CAP_FOWNER', 'CAP_MKNOD', 'CAP_NET_RAW', 'CAP_SETGID', 'CAP_SETUID', 'CAP_SETFCAP', 'CAP_SETPCAP', 'CAP_NET_BIND_SERVICE', 'CAP_SYS_CHROOT', 'CAP_KILL', 'CAP_AUDIT_WRITE'], 'ExecIDs': [], 'ExitCommand': ['/usr/bin/podman', '--root', '/var/lib/containers/storage', '--runroot', '/var/run/containers/storage', '--log-level', 'error', '--cgroup-manager', 'systemd', '--tmpdir', '/var/run/libpod', '--runtime', 'runc', '--storage-driver', 'overlay', '--events-backend', 'journald', 'container', 'cleanup', 'c9e813703f9b80a6ea2ad665aa9946435934e478a0c5322da835f3883872f'], 'GraphDriver': {'Name': 'overlay'}, 'HostConfig': {'AutoRemove': False, 'Binds': [], 'BlkioDeviceReadBps': None, 'BlkioDeviceReadIOps': None, 'BlkioDeviceWriteBps': None, 'BlkioDeviceWriteIOps': None, 'BlkioWeight': 0, 'BlkioWeightDevice': None, 'CapAdd': [], 'CapDrop': [], 'Cgroup': '', 'CgroupParent': '', 'ConsoleSize': [0, 0], 'ContainerIDFile': '', 'CpuCount': 0, 'CpuPercent': 0, 'CpuPeriod': 0, 'CpuQuota': 0, 'CpuRealtimePeriod': 0, 'CpuRealtimeRuntime': 0, 'CpuShares': 0, 'CpusetCpus': '', 'CpusetMems': '', 'Devices': [], 'DiskQuota': 0, 'Dns': [], 'DnsOptions': [], 'DnsSearch': [], 'ExtraHosts': [], 'GroupAdd': [], 'IOMaximumBandwidth': 0, 'IOMaximumIOps': 0, 'IpcMode': '', 'Isolation': '', 'KernelMemory': 0, 'Links': None, 'LogConfig': {'Config': None, 'Type': 'k8s-file'}, 'Memory': 0, 'MemoryReservation': 0, 'MemorySwap': 0, 'MemorySwappiness': -1, 'NanoCpus': 0, 'NetworkMode': 'default', 'OomKillDisable': False, 'OomScoreAdj': 0, 'PidMode': '', 'PidsLimit': 0, 'PortBindings': {}, 'Privileged': False, 'PublishAllPorts': False, 'ReadonlyRootfs': False, 'RestartPolicy': {'MaximumRetryCount': 0, 'Name': ''}, 'Runtime': 'oci', 'SecurityOpt': [], 'ShmSize': 65536000, 'Tmpfs': {}, 'UTSMode': '', 'Ulimits': [{'Hard': 1048576, 'Name': 'RLIMIT_NOFILE', 'Soft': 1048576}, {'Hard': 1048576, 'Name': 'RLIMIT_NPROC', 'Soft': 1048576}], 'UsernsMode': '', 'VolumeDriver': '', 'VolumesFrom': None}, 'HostnamePath': '', 'HostsPath': '', 'Id': 'c5c39f9b80a6ea2ad665aa9946435934e478a0c5322da835f3883872f', 'Image': '0e267acda67d0ebd643e900d820a91b961d859743039e620191ca1', 'ImageName': 'docker.io/tripleomaster/centos-haproxy:latest', 'IsInfra': False, 'MountLabel': 'system_u:object_r:svirt_sandbox_file_t:s0:c78,c866', 'Mounts': [], 'Name': 'haproxy', 'Namespace': '', 'NetworkSettings': {'Bridge': '', 'EndpointID': '', 'Gateway': '', 'GlobalIPv6Address': '', 'GlobalIPv6PrefixLen': 0, 'HairpinMode': False, 'IPAddress': '', 'IPPrefixLen': 0, 'IPv6Gateway': '', 'LinkLocalIPv6Address': '', 'LinkLocalIPv6PrefixLen': 0, 'MacAddress': '', 'Ports': [], 'SandboxID': '', 'SandboxKey': '', 'SecondaryIPAddresses': None, 'SecondaryIPv6Addresses': None}, 'OCIRuntime': 'runc', 'Path': 'dumb-init', 'Pod': '', 'ProcessLabel': 'system_u:system_r:svirt_lxc_net_t:s0:c785,c866', 'ResolvConfPath': '', 'RestartCount': 0, 'Rootfs': '', 'State': {'Dead': False, 'Error': '', 'ExitCode': 0, 'FinishedAt': '0001-01-01T00:00:00Z', 'Healthcheck': {'FailingStreak': 0, 'Log': None, 'Status': ''}, 'OOMKilled': False, 'OciVersion': '1.0.1-dev', 'Paused': False, 'Pid': 0, 'Restarting': False, 'Running': False, 'StartedAt': '0001-01-01T00:00:00Z', 'Status': 'configured'}}]
-
-

+ + + + + + + + + + + +

Key

Description

+

containers

+

list / elements=dictionary

+

Facts from all or specified containers

+

Returned: always

+

Sample: [{"AppArmorProfile": "", "Args": ["--single-child", "--", "kolla_start"], "BoundingCaps": ["CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_FSETID", "CAP_FOWNER", "CAP_MKNOD", "CAP_NET_RAW", "CAP_SETGID", "CAP_SETUID", "CAP_SETFCAP", "CAP_SETPCAP", "CAP_NET_BIND_SERVICE", "CAP_SYS_CHROOT", "CAP_KILL", "CAP_AUDIT_WRITE"], "Config": {"Annotations": {"io.kubernetes.cri-o.ContainerType": "sandbox", "io.kubernetes.cri-o.TTY": "false", "io.podman.annotations.autoremove": "FALSE", "io.podman.annotations.init": "FALSE", "io.podman.annotations.privileged": "FALSE", "io.podman.annotations.publish-all": "FALSE"}, "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": ["kolla_start"], "Domainname": "", "Entrypoint": "dumb-init --single-child --", "Env": ["PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "HOSTNAME=", "container=oci", "KOLLA_INSTALL_METATYPE=rdo", "KOLLA_BASE_DISTRO=centos", "KOLLA_INSTALL_TYPE=binary", "KOLLA_DISTRO_PYTHON_VERSION=2.7", "KOLLA_BASE_ARCH=x86_64"], "Hostname": "c5c39e813703", "Image": "docker.io/tripleomaster/centos-haproxy:latest", "Labels": {"build-date": "20190919", "kolla_version": "8.1.0", "name": "haproxy", "org.label-schema.build-date": "20190801", "org.label-schema.license": "GPLv2", "org.label-schema.name": "CentOS Base Image", "org.label-schema.schema-version": "1.0", "org.label-schema.vendor": "CentOS"}, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "StopSignal": 15, "Tty": false, "User": "", "Volumes": null, "WorkingDir": "/"}, "Created": "2019-10-01T12:51:00.233106443Z", "Dependencies": [], "Driver": "overlay", "EffectiveCaps": ["CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_FSETID", "CAP_FOWNER", "CAP_MKNOD", "CAP_NET_RAW", "CAP_SETGID", "CAP_SETUID", "CAP_SETFCAP", "CAP_SETPCAP", "CAP_NET_BIND_SERVICE", "CAP_SYS_CHROOT", "CAP_KILL", "CAP_AUDIT_WRITE"], "ExecIDs": [], "ExitCommand": ["/usr/bin/podman", "--root", "/var/lib/containers/storage", "--runroot", "/var/run/containers/storage", "--log-level", "error", "--cgroup-manager", "systemd", "--tmpdir", "/var/run/libpod", "--runtime", "runc", "--storage-driver", "overlay", "--events-backend", "journald", "container", "cleanup", "c9e813703f9b80a6ea2ad665aa9946435934e478a0c5322da835f3883872f"], "GraphDriver": {"Name": "overlay"}, "HostConfig": {"AutoRemove": false, "Binds": [], "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": [], "CapDrop": [], "Cgroup": "", "CgroupParent": "", "ConsoleSize": [0, 0], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DiskQuota": 0, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [], "GroupAdd": [], "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "", "Isolation": "", "KernelMemory": 0, "Links": null, "LogConfig": {"Config": null, "Type": "k8s-file"}, "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": -1, "NanoCpus": 0, "NetworkMode": "default", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "", "PidsLimit": 0, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "RestartPolicy": {"MaximumRetryCount": 0, "Name": ""}, "Runtime": "oci", "SecurityOpt": [], "ShmSize": 65536000, "Tmpfs": {}, "UTSMode": "", "Ulimits": [{"Hard": 1048576, "Name": "RLIMIT_NOFILE", "Soft": 1048576}, {"Hard": 1048576, "Name": "RLIMIT_NPROC", "Soft": 1048576}], "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null}, "HostnamePath": "", "HostsPath": "", "Id": "c5c39f9b80a6ea2ad665aa9946435934e478a0c5322da835f3883872f", "Image": "0e267acda67d0ebd643e900d820a91b961d859743039e620191ca1", "ImageName": "docker.io/tripleomaster/centos-haproxy:latest", "IsInfra": false, "MountLabel": "system_u:object_r:svirt_sandbox_file_t:s0:c78,c866", "Mounts": [], "Name": "haproxy", "Namespace": "", "NetworkSettings": {"Bridge": "", "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "", "Ports": [], "SandboxID": "", "SandboxKey": "", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null}, "OCIRuntime": "runc", "Path": "dumb-init", "Pod": "", "ProcessLabel": "system_u:system_r:svirt_lxc_net_t:s0:c785,c866", "ResolvConfPath": "", "RestartCount": 0, "Rootfs": "", "State": {"Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "0001-01-01T00:00:00Z", "Healthcheck": {"FailingStreak": 0, "Log": null, "Status": ""}, "OOMKilled": false, "OciVersion": "1.0.1-dev", "Paused": false, "Pid": 0, "Restarting": false, "Running": false, "StartedAt": "0001-01-01T00:00:00Z", "Status": "configured"}}]

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

  • Emilien Macchi (@EmilienM)

-
-
-
+ + + +
@@ -184,11 +176,48 @@

Navigation

+ + + @@ -218,8 +247,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_container – Manage podman containers — Python documentation + + + + containers.podman.podman_container module – Manage podman containers — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_container – Manage podman containers

+
+

containers.podman.podman_container module – Manage podman containers

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_container.

-
-

New in version 1.0.0: of containers.podman

-
-
+

New in containers.podman 1.0.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Start, stop, restart and manage Podman containers

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+

Parameters

+
ParameterChoices/DefaultsComments
-
- annotation - -
- dictionary -
-
- -
Add an annotation to the container. The format is key value, multiple times.
-
-
- authfile - -
- path -
-
- -
Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` (Not available for remote commands) You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``
-
-
- blkio_weight - -
- integer -
-
- -
Block IO weight (relative weight) accepts a weight value between 10 and 1000
-
-
- blkio_weight_device - -
- dictionary -
-
- -
Block IO weight (relative device weight, format DEVICE_NAME[:]WEIGHT).
-
-
- cap_add - -
- list - / elements=string
-
- -
List of capabilities to add to the container.
-

aliases: capabilities
-
-
- cap_drop - -
- list - / elements=string
-
- -
List of capabilities to drop from the container.
-
-
- cgroup_parent - -
- path -
-
- -
Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
-
-
- cgroupns - -
- string -
-
- -
Path to cgroups under which the cgroup for the container will be created.
-
-
- cgroups - -
- string -
-
- -
Determines whether the container will create CGroups. Valid values are enabled and disabled, which the default being enabled. The disabled option will force the container to not create CGroups, and thus conflicts with CGroup options cgroupns and cgroup-parent.
-
-
- cidfile - -
- path -
-
- -
Write the container ID to the file
-
-
- cmd_args - -
- list - / elements=string
-
- -
Any additional command options you want to pass to podman command, cmd_args - ['--other-param', 'value'] Be aware module doesn't support idempotency if this is set.
-
-
- command - -
- raw -
-
- -
Override command of container. Can be a string or a list.
-
-
- conmon_pidfile - -
- path -
-
- -
Write the pid of the conmon process to a file. conmon runs in a separate process than Podman, so this is necessary when using systemd to restart Podman containers.
-
-
- cpu_period - -
- integer -
-
- -
Limit the CPU real-time period in microseconds
-
-
- cpu_rt_period - -
- integer -
-
- -
Limit the CPU real-time period in microseconds. Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify.
-
-
- cpu_rt_runtime - -
- integer -
-
- -
Limit the CPU real-time runtime in microseconds. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume.
-
-
- cpu_shares - -
- integer -
-
- -
CPU shares (relative weight)
-
-
- cpus - -
- string -
-
- -
Number of CPUs. The default is 0.0 which means no limit.
-
-
- cpuset_cpus - -
- string -
-
- -
CPUs in which to allow execution (0-3, 0,1)
-
-
- cpuset_mems - -
- string -
-
- -
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
-
-
- debug - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return additional information which can be helpful for investigations.
-
-
- detach - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Run container in detach mode
-
-
- detach_keys - -
- string -
-
- -
Override the key sequence for detaching a container. Format is a single character or ctrl-value
-
-
- device - -
- list - / elements=string
-
- -
Add a host device to the container. The format is <device-on-host>[:<device-on-container>][:<permissions>] (e.g. device /dev/sdc:/dev/xvdc:rwm)
-
-
- device_read_bps - -
- list - / elements=string
-
- -
Limit read rate (bytes per second) from a device (e.g. device-read-bps /dev/sda:1mb)
-
-
- device_read_iops - -
- list - / elements=string
-
- -
Limit read rate (IO per second) from a device (e.g. device-read-iops /dev/sda:1000)
-
-
- device_write_bps - -
- list - / elements=string
-
- -
Limit write rate (bytes per second) to a device (e.g. device-write-bps /dev/sda:1mb)
-
-
- device_write_iops - -
- list - / elements=string
-
- -
Limit write rate (IO per second) to a device (e.g. device-write-iops /dev/sda:1000)
-
-
- dns - -
- list - / elements=string
-
- -
Set custom DNS servers
-

aliases: dns_servers
-
-
- dns_option - -
- string -
-
- -
Set custom DNS options
-

aliases: dns_opts
-
- - dns_search - -
- string -
-
- -
Set custom DNS search domains (Use dns_search with '' if you don't wish to set the search domain)
-

aliases: dns_search_domains
-
-
- entrypoint - -
- string -
-
- -
Overwrite the default ENTRYPOINT of the image
-
-
- env - -
- dictionary -
-
- -
Set environment variables. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container.
-
-
- env_file - -
- path -
-
- -
Read in a line delimited file of environment variables. Doesn't support idempotency. If users changes the file with environment variables it's on them to recreate the container.
-
-
- env_host - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Use all current host environment variables in container. Defaults to false.
-
-
- etc_hosts - -
- dictionary -
-
- -
Dict of host-to-IP mappings, where each host name is a key in the dictionary. Each host name will be added to the container's ``/etc/hosts`` file.
-

aliases: add_hosts
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- expose - -
- list - / elements=string
-
- -
Expose a port, or a range of ports (e.g. expose "3300-3310") to set up port redirection on the host system.
-

aliases: exposed, exposed_ports
-
-
- force_restart - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Force restart of container.
-

aliases: restart
-
-
- generate_systemd - -
- dictionary -
-
- Default:
{}
-
-
Generate systemd unit file for container.
-
-
- after - -
- list - / elements=string
-
- -
Add the systemd unit after (After=) option, that ordering dependencies between the list of dependencies and this service.
-
-
- container_prefix - -
- string -
-
- -
Set the systemd unit name prefix for containers. The default is "container".
-
-
- names - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Use names of the containers for the start, stop, and description in the unit file. Default is true.
-
-
- new - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Create containers and pods when the unit is started instead of expecting them to exist. The default is "false". Refer to podman-generate-systemd(1) for more information.
-
-
- no_header - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Do not generate the header including meta data such as the Podman version and the timestamp. From podman version 3.1.0.
-
-
- path - -
- string -
-
- -
Specify a path to the directory where unit files will be generated. Required for this option. If it doesn't exist, the directory will be created.
-
-
- pod_prefix - -
- string -
-
- -
Set the systemd unit name prefix for pods. The default is "pod".
-
-
- requires - -
- list - / elements=string
-
- -
Set the systemd unit requires (Requires=) option. Similar to wants, but declares a stronger requirement dependency.
-
-
- restart_policy - -
- string -
-
-
    Choices: -
  • no
  • -
  • on-success
  • -
  • on-failure
  • -
  • on-abnormal
  • -
  • on-watchdog
  • -
  • on-abort
  • -
  • always
  • -
-
-
Specify a restart policy for the service. The restart-policy must be one of "no", "on-success", "on-failure", "on-abnormal", "on-watchdog", "on-abort", or "always". The default policy is "on-failure".
-
-
- separator - -
- string -
-
- -
Set the systemd unit name separator between the name/id of a container/pod and the prefix. The default is "-" (dash).
-
-
- time - -
- integer -
-
- -
Override the default stop timeout for the container with the given value.
-
-
- wants - -
- list - / elements=string
-
- -
Add the systemd unit wants (Wants=) option, that this service is (weak) dependent on.
-
-
- gidmap - -
- list - / elements=string
-
- -
Run the container in a new user namespace using the supplied mapping.
-
-
- group_add - -
- list - / elements=string
-
- -
Add additional groups to run as
-

aliases: groups
-
-
- healthcheck - -
- string -
-
- -
Set or alter a healthcheck command for a container.
-
-
- healthcheck_interval - -
- string -
-
- -
Set an interval for the healthchecks (a value of disable results in no automatic timer setup) (default "30s")
-
-
- healthcheck_retries - -
- integer -
-
- -
The number of retries allowed before a healthcheck is considered to be unhealthy. The default value is 3.
-
-
- healthcheck_start_period - -
- string -
-
- -
The initialization time needed for a container to bootstrap. The value can be expressed in time format like 2m3s. The default value is 0s
-
-
- healthcheck_timeout - -
- string -
-
- -
The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the value can be expressed in a time format such as 1m22s. The default value is 30s
-
-
- hostname - -
- string -
-
- -
Container host name. Sets the container host name that is available inside the container.
-
-
- http_proxy - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
By default proxy environment variables are passed into the container if set for the podman process. This can be disabled by setting the http_proxy option to false. The environment variables passed in include http_proxy, https_proxy, ftp_proxy, no_proxy, and also the upper case versions of those. Defaults to true
-
-
- image - -
- string -
-
- -
Repository path (or image name) and tag used to create the container. If an image is not found, the image will be pulled from the registry. If no tag is included, latest will be used.
-
Can also be an image ID. If this is the case, the image is assumed to be available locally.
-
-
- image_strict - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to compare images in idempotency by taking into account a full name with registry and namespaces.
-
-
- image_volume - -
- string -
-
-
    Choices: -
  • bind
  • -
  • tmpfs
  • -
  • ignore
  • -
-
-
Tells podman how to handle the builtin image volumes. The options are bind, tmpfs, or ignore (default bind)
-
-
- init - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Run an init inside the container that forwards signals and reaps processes. The default is false.
-
-
- init_path - -
- string -
-
- -
Path to the container-init binary.
-
-
- interactive - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Keep STDIN open even if not attached. The default is false. When set to true, keep stdin open even if not attached. The default is false.
-
-
- ip - -
- string -
-
- -
Specify a static IP address for the container, for example '10.88.64.128'. Can only be used if no additional CNI networks to join were specified via 'network:', and if the container is not joining another container's network namespace via 'network container:<name|id>'. The address must be within the default CNI network's pool (default 10.88.0.0/16).
-
-
- ipc - -
- string -
-
- -
Default is to create a private IPC namespace (POSIX SysV IPC) for the container
-

aliases: ipc_mode
-
-
- kernel_memory - -
- string -
-
- -
Kernel memory limit (format <number>[<unit>], where unit = b, k, m or g) Note - idempotency is supported for integers only.
-
-
- label - -
- dictionary -
-
- -
Add metadata to a container, pass dictionary of label names and values
-

aliases: labels
-
-
- label_file - -
- string -
-
- -
Read in a line delimited file of labels
-
-
- log_driver - -
- string -
-
-
    Choices: -
  • k8s-file
  • -
  • journald
  • -
  • json-file
  • -
-
-
Logging driver. Used to set the log driver for the container. For example log_driver "k8s-file".
-
-
- log_level - -
- string -
-
-
    Choices: -
  • debug
  • -
  • info
  • -
  • warn
  • -
  • error
  • -
  • fatal
  • -
  • panic
  • -
-
-
Logging level for Podman. Log messages above specified level ("debug"|"info"|"warn"|"error"|"fatal"|"panic") (default "error")
-
-
- log_opt - -
- dictionary -
-
- -
Logging driver specific options. Used to set the path to the container log file.
-

aliases: log_options
-
-
- max_size - -
- string -
-
- -
Specify a max size of the log file (e.g 10mb).
-
-
- path - -
- string -
-
- -
Specify a path to the log file (e.g. /var/log/container/mycontainer.json).
-
-
- tag - -
- string -
-
- -
Specify a custom log tag for the container.
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

annotation

+

dictionary

+

Add an annotation to the container. The format is key value, multiple times.

+
+

attach

+

list / elements=string

+

Attach to STDIN, STDOUT or STDERR. The default in Podman is false.

+

Choices:

+
    +
  • "stdin"

  • +
  • "stdout"

  • +
  • "stderr"

  • +
+
+

authfile

+

path

+

Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` (Not available for remote commands) You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``

+
+

blkio_weight

+

integer

+

Block IO weight (relative weight) accepts a weight value between 10 and 1000

+
+

blkio_weight_device

+

dictionary

+

Block IO weight (relative device weight, format DEVICE_NAME[:]WEIGHT).

+
+
+

cap_add

+

aliases: capabilities

+

list / elements=string

+

List of capabilities to add to the container.

+
+

cap_drop

+

list / elements=string

+

List of capabilities to drop from the container.

+
+

cgroup_parent

+

path

+

Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.

+
+

cgroupns

+

string

+

Path to cgroups under which the cgroup for the container will be created.

+
+

cgroups

+

string

+

Determines whether the container will create CGroups. Valid values are enabled and disabled, which the default being enabled. The disabled option will force the container to not create CGroups, and thus conflicts with CGroup options cgroupns and cgroup-parent.

+
+

cidfile

+

path

+

Write the container ID to the file

+
+

cmd_args

+

list / elements=string

+

Any additional command options you want to pass to podman command itself, for example --log-level=debug or --syslog. This is NOT command to run in container, but rather options for podman itself. For container command please use command option.

+
+

command

+

any

+

Override command of container. Can be a string or a list.

+
+

conmon_pidfile

+

path

+

Write the pid of the conmon process to a file. conmon runs in a separate process than Podman, so this is necessary when using systemd to restart Podman containers.

+
+

cpu_period

+

integer

+

Limit the CPU CFS (Completely Fair Scheduler) period

+
+

cpu_quota

+

integer

+

Limit the CPU CFS (Completely Fair Scheduler) quota

+
+

cpu_rt_period

+

integer

+

Limit the CPU real-time period in microseconds. Limit the container’s Real Time CPU usage. This flag tell the kernel to restrict the container’s Real Time CPU usage to the period you specify.

+
+

cpu_rt_runtime

+

integer

+

Limit the CPU real-time runtime in microseconds. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume.

+
+

cpu_shares

+

integer

+

CPU shares (relative weight)

+
+

cpus

+

string

+

Number of CPUs. The default is 0.0 which means no limit.

+
+

cpuset_cpus

+

string

+

CPUs in which to allow execution (0-3, 0,1)

+
+

cpuset_mems

+

string

+

Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.

+
+

debug

+

boolean

+

Return additional information which can be helpful for investigations.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

delete_depend

+

boolean

+

Remove selected container and recursively remove all containers that depend on it. Applies to “delete” command.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

delete_time

+

string

+

Seconds to wait before forcibly stopping the container. Use -1 for infinite wait. Applies to “delete” command.

+
+

delete_volumes

+

boolean

+

Remove anonymous volumes associated with the container. This does not include named volumes created with podman volume create, or the –volume option of podman run and podman create.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

detach

+

boolean

+

Run container in detach mode

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

detach_keys

+

string

+

Override the key sequence for detaching a container. Format is a single character or ctrl-value

+
+

device

+

list / elements=string

+

Add a host device to the container. The format is <device-on-host>[:<device-on-container>][:<permissions>] (e.g. device /dev/sdc:/dev/xvdc:rwm)

+
+

device_read_bps

+

list / elements=string

+

Limit read rate (bytes per second) from a device (e.g. device-read-bps /dev/sda:1mb)

+
+

device_read_iops

+

list / elements=string

+

Limit read rate (IO per second) from a device (e.g. device-read-iops /dev/sda:1000)

+
+

device_write_bps

+

list / elements=string

+

Limit write rate (bytes per second) to a device (e.g. device-write-bps /dev/sda:1mb)

+
+

device_write_iops

+

list / elements=string

+

Limit write rate (IO per second) to a device (e.g. device-write-iops /dev/sda:1000)

+
+
+

dns

+

aliases: dns_servers

+

list / elements=string

+

Set custom DNS servers

+
+
+

dns_option

+

aliases: dns_opts

+

string

+

Set custom DNS options

+
+ +

dns_search

+

aliases: dns_search_domains

+

string

+

Set custom DNS search domains (Use dns_search with ‘’ if you don’t wish to set the search domain)

+
+

entrypoint

+

string

+

Overwrite the default ENTRYPOINT of the image

+
+

env

+

dictionary

+

Set environment variables. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container.

+
+
+

env_file

+

aliases: env_files

+

list / elements=path

+

Read in a line delimited file of environment variables. Doesn’t support idempotency. If users changes the file with environment variables it’s on them to recreate the container. The file must be present on the REMOTE machine where actual podman is running, not on the controller machine where Ansible is executing. If you need to copy the file from controller to remote machine, use the copy or slurp module.

+
+

env_host

+

boolean

+

Use all current host environment variables in container. Defaults to false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+
+

etc_hosts

+

aliases: add_hosts

+

dictionary

+

Dict of host-to-IP mappings, where each host name is a key in the dictionary. Each host name will be added to the container’s ``/etc/hosts`` file.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+
+
+

expose

+

aliases: exposed, exposed_ports

+

list / elements=string

+

Expose a port, or a range of ports (e.g. expose “3300-3310”) to set up port redirection on the host system.

+
+

force_delete

+

boolean

+

Force deletion of container when it’s being deleted.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+
+

force_restart

+

aliases: restart

+

boolean

+

Force restart of container.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

generate_systemd

+

dictionary

+

Generate systemd unit file for container.

+

Default: {}

+
+

after

+

list / elements=string

+

Add the systemd unit after (After=) option, that ordering dependencies between the list of dependencies and this service.

+
+

container_prefix

+

string

+

Set the systemd unit name prefix for containers. The default is “container”.

+
+

names

+

boolean

+

Use names of the containers for the start, stop, and description in the unit file. Default is true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

new

+

boolean

+

Create containers and pods when the unit is started instead of expecting them to exist. The default is “false”. Refer to podman-generate-systemd(1) for more information.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

no_header

+

boolean

+

Do not generate the header including meta data such as the Podman version and the timestamp. From podman version 3.1.0.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

path

+

string

+

Specify a path to the directory where unit files will be generated. Required for this option. If it doesn’t exist, the directory will be created.

+
+

pod_prefix

+

string

+

Set the systemd unit name prefix for pods. The default is “pod”.

+
+

requires

+

list / elements=string

+

Set the systemd unit requires (Requires=) option. Similar to wants, but declares a stronger requirement dependency.

+
+

restart_policy

+

string

+

Specify a restart policy for the service. The restart-policy must be one of “no”, “on-success”, “on-failure”, “on-abnormal”, “on-watchdog”, “on-abort”, or “always”. The default policy is “on-failure”.

+

Choices:

+
    +
  • "no"

  • +
  • "on-success"

  • +
  • "on-failure"

  • +
  • "on-abnormal"

  • +
  • "on-watchdog"

  • +
  • "on-abort"

  • +
  • "always"

  • +
+
+

restart_sec

+

integer

+

Set the systemd service restartsec value.

+
+

separator

+

string

+

Set the systemd unit name separator between the name/id of a container/pod and the prefix. The default is “-” (dash).

+
+

start_timeout

+

integer

+

Override the default start timeout for the container with the given value.

+
+
+

stop_timeout

+

aliases: time

+

integer

+

Override the default stop timeout for the container with the given value. Called `time` before version 4.

+
+

wants

+

list / elements=string

+

Add the systemd unit wants (Wants=) option, that this service is (weak) dependent on.

+
+

gidmap

+

list / elements=string

+

Run the container in a new user namespace using the supplied mapping.

+
+
+

group_add

+

aliases: groups

+

list / elements=string

+

Add additional groups to run as

+
+

healthcheck

+

string

+

Set or alter a healthcheck command for a container.

+
+

healthcheck_failure_action

+

string

+

The action to be taken when the container is considered unhealthy. The action must be one of “none”, “kill”, “restart”, or “stop”. The default policy is “none”.

+

Choices:

+
    +
  • "none"

  • +
  • "kill"

  • +
  • "restart"

  • +
  • "stop"

  • +
+
+

healthcheck_interval

+

string

+

Set an interval for the healthchecks (a value of disable results in no automatic timer setup) (default “30s”)

+
+

healthcheck_retries

+

integer

+

The number of retries allowed before a healthcheck is considered to be unhealthy. The default value is 3.

+
+

healthcheck_start_period

+

string

+

The initialization time needed for a container to bootstrap. The value can be expressed in time format like 2m3s. The default value is 0s

+
+

healthcheck_timeout

+

string

+

The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the value can be expressed in a time format such as 1m22s. The default value is 30s

+
+

hooks_dir

+

list / elements=string

+

Each .json file in the path configures a hook for Podman containers. For more details on the syntax of the JSON files and the semantics of hook injection, see oci-hooks(5). Can be set multiple times.

+
+

hostname

+

string

+

Container host name. Sets the container host name that is available inside the container.

+
+

http_proxy

+

boolean

+

By default proxy environment variables are passed into the container if set for the podman process. This can be disabled by setting the http_proxy option to false. The environment variables passed in include http_proxy, https_proxy, ftp_proxy, no_proxy, and also the upper case versions of those. Defaults to true

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

image

+

string

+

Repository path (or image name) and tag used to create the container. If an image is not found, the image will be pulled from the registry. If no tag is included, latest will be used.

+

Can also be an image ID. If this is the case, the image is assumed to be available locally.

+
+

image_strict

+

boolean

+

Whether to compare images in idempotency by taking into account a full name with registry and namespaces.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

image_volume

+

string

+

Tells podman how to handle the builtin image volumes. The options are bind, tmpfs, or ignore (default bind)

+

Choices:

+
    +
  • "bind"

  • +
  • "tmpfs"

  • +
  • "ignore"

  • +
+
+

init

+

boolean

+

Run an init inside the container that forwards signals and reaps processes. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

init_path

+

string

+

Path to the container-init binary.

+
+

interactive

+

boolean

+

Keep STDIN open even if not attached. The default is false. When set to true, keep stdin open even if not attached. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

ip

+

string

+

Specify a static IP address for the container, for example ‘10.88.64.128’. Can only be used if no additional CNI networks to join were specified via ‘network:’, and if the container is not joining another container’s network namespace via ‘network container:<name|id>’. The address must be within the default CNI network’s pool (default 10.88.0.0/16).

+
+
+

ipc

+

aliases: ipc_mode

+

string

+

Default is to create a private IPC namespace (POSIX SysV IPC) for the container

+
+

kernel_memory

+

string

+

Kernel memory limit (format <number>[<unit>], where unit = b, k, m or g) Note - idempotency is supported for integers only.

+
+
+

label

+

aliases: labels

+

dictionary

+

Add metadata to a container, pass dictionary of label names and values

+
+

label_file

+

string

+

Read in a line delimited file of labels

+
+

log_driver

+

string

+

Logging driver. Used to set the log driver for the container. For example log_driver “k8s-file”.

+

Choices:

+
    +
  • "k8s-file"

  • +
  • "journald"

  • +
  • "json-file"

  • +
+
+

log_level

+

string

+

Logging level for Podman. Log messages above specified level (“debug”|”info”|”warn”|”error”|”fatal”|”panic”) (default “error”)

+

Choices:

+
    +
  • "debug"

  • +
  • "info"

  • +
  • "warn"

  • +
  • "error"

  • +
  • "fatal"

  • +
  • "panic"

  • +
+
+
+

log_opt

+

aliases: log_options

+

dictionary

+

Logging driver specific options. Used to set the path to the container log file.

+
+
+

max_size

+

string

+

Specify a max size of the log file (e.g 10mb).

+
+
+

path

+

string

+

Specify a path to the log file (e.g. /var/log/container/mycontainer.json).

+
+
+

tag

+

string

+

Specify a custom log tag for the container.

+
+

mac_address

+

string

+

Specify a MAC address for the container, for example ‘92:d0:c6:0a:29:33’. Don’t forget that it must be unique within one Ethernet network.

+
+

memory

+

string

+

Memory limit (format 10k, where unit = b, k, m or g) Note - idempotency is supported for integers only.

+
+

memory_reservation

+

string

+

Memory soft limit (format 100m, where unit = b, k, m or g) Note - idempotency is supported for integers only.

+
+

memory_swap

+

string

+

A limit value equal to memory plus swap. Must be used with the -m (–memory) flag. The swap LIMIT should always be larger than -m (–memory) value. By default, the swap LIMIT will be set to double the value of –memory Note - idempotency is supported for integers only.

+
+

memory_swappiness

+

integer

+

Tune a container’s memory swappiness behavior. Accepts an integer between 0 and 100.

+
+
+

mount

+

aliases: mounts

+

list / elements=string

+

Attach a filesystem mount to the container. bind or tmpfs For example mount “type=bind,source=/path/on/host,destination=/path/in/container”

+
+

name

+

string / required

+

Name of the container

+
+
+
+

network

+

aliases: net, network_mode

+

list / elements=string

+

Set the Network mode for the container * bridge create a network stack on the default bridge * none no networking * container:<name|id> reuse another container’s network stack * host use the podman host network stack. * <network-name>|<network-id> connect to a user-defined network * ns:<path> path to a network namespace to join * slirp4netns use slirp4netns to create a user network stack. This is the default for rootless containers

+
+

network_aliases

+

list / elements=string

+

Add network-scoped alias for the container. A container will only have access to aliases on the first network that it joins. This is a limitation that will be removed in a later release.

+
+

no_hosts

+

boolean

+

Do not create /etc/hosts for the container Default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

oom_kill_disable

+

boolean

+

Whether to disable OOM Killer for the container or not. Default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

oom_score_adj

+

integer

+

Tune the host’s OOM preferences for containers (accepts -1000 to 1000)

+
+
+

pid

+

aliases: pid_mode

+

string

+

Set the PID mode for the container

+
+

pids_limit

+

string

+

Tune the container’s PIDs limit. Set -1 to have unlimited PIDs for the container.

+
+

pod

+

string

+

Run container in an existing pod. If you want podman to make the pod for you, prefix the pod name with “new:”

+
+

privileged

+

boolean

+

Give extended privileges to this container. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+
+
+
+

publish

+

aliases: ports, published, published_ports

+

list / elements=string

+

Publish a container’s port, or range of ports, to the host. Format - ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort In case of only containerPort is set, the hostPort will chosen randomly by Podman.

+
+

publish_all

+

boolean

+

Publish all exposed ports to random ports on the host interfaces. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

read_only

+

boolean

+

Mount the container’s root filesystem as read only. Default is false

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

read_only_tmpfs

+

boolean

+

If container is running in –read-only mode, then mount a read-write tmpfs on /run, /tmp, and /var/tmp. The default is true

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

recreate

+

boolean

+

Use with present and started states to force the re-creation of an existing container.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

requires

+

list / elements=string

+

Specify one or more requirements. A requirement is a dependency container that will be started before this container. Containers can be specified by name or ID.

+
+

restart_policy

+

string

+

Restart policy to follow when containers exit. Restart policy will not take effect if a container is stopped via the podman kill or podman stop commands. Valid values are * no - Do not restart containers on exit * on-failure[:max_retries] - Restart containers when they exit with a non-0 exit code, retrying indefinitely or until the optional max_retries count is hit * always - Restart containers when they exit, regardless of status, retrying indefinitely

+
+

restart_time

+

string

+

Seconds to wait before forcibly stopping the container when restarting. Use -1 for infinite wait. Applies to “restarted” status.

+
+
+
+

rm

+

aliases: remove, auto_remove

+

boolean

+

Automatically remove the container when it exits. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

rootfs

+

boolean

+

If true, the first argument refers to an exploded container on the file system. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

sdnotify

+

string

+

Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify. Can be container, conmon, ignore.

+
+

secrets

+

list / elements=string

+

Add the named secrets into the container. The format is secret[,opt=opt...], see documentation for more details.

+
+

security_opt

+

list / elements=string

+

Security Options. For example security_opt “seccomp=unconfined”

+
+

shm_size

+

string

+

Size of /dev/shm. The format is <number><unit>. number must be greater than 0. Unit is optional and can be b (bytes), k (kilobytes), m(megabytes), or g (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses 64m

+
+

sig_proxy

+

boolean

+

Proxy signals sent to the podman run command to the container process. SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

state

+

string

+

absent - A container matching the specified name will be stopped and removed.

+

present - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config. Image version will be taken into account when comparing configuration. Use the recreate option to force the re-creation of the matching container.

+

started - Asserts there is a running container matching the name and any provided configuration. If no container matches the name, a container will be created and started. Use recreate to always re-create a matching container, even if it is running. Use force_restart to force a matching container to be stopped and restarted.

+

stopped - Asserts that the container is first present, and then if the container is running moves it to a stopped state.

+

created - Asserts that the container exists with given configuration. If container doesn’t exist, the module creates it and leaves it in ‘created’ state. If configuration doesn’t match or ‘recreate’ option is set, the container will be recreated

+

Choices:

+
    +
  • "absent"

  • +
  • "present"

  • +
  • "stopped"

  • +
  • "started" ← (default)

  • +
  • "created"

  • +
+
+

stop_signal

+

integer

+

Signal to stop a container. Default is SIGTERM.

+
+

stop_time

+

string

+

Seconds to wait before forcibly stopping the container. Use -1 for infinite wait. Applies to “stopped” status.

+
+

stop_timeout

+

integer

+

Timeout (in seconds) to stop a container. Default is 10.

+
+

subgidname

+

string

+

Run the container in a new user namespace using the map with ‘name’ in the /etc/subgid file.

+
+

subuidname

+

string

+

Run the container in a new user namespace using the map with ‘name’ in the /etc/subuid file.

+
+

sysctl

+

dictionary

+

Configure namespaced kernel parameters at runtime

+
+

systemd

+

string

+

Run container in systemd mode. The default is true.

+
+

timezone

+

string

+

Set timezone in container. This flag takes area-based timezones, GMT time, as well as local, which sets the timezone in the container to match the host machine. See /usr/share/zoneinfo/ for valid timezones. Remote connections use local containers.conf for defaults.

+
+

tmpfs

+

dictionary

+

Create a tmpfs mount. For example tmpfs “/tmp” “rw,size=787448k,mode=1777”

+
+

tty

+

boolean

+

Allocate a pseudo-TTY. The default is false.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

uidmap

+

list / elements=string

+

Run the container in a new user namespace using the supplied mapping.

+
+
+

ulimit

+

aliases: ulimits

+

list / elements=string

+

Ulimit options

+
+

user

+

string

+

Sets the username or UID used and optionally the groupname or GID for the specified command.

+
+
+

userns

+

aliases: userns_mode

+

string

+

Set the user namespace mode for the container. It defaults to the PODMAN_USERNS environment variable. An empty value means user namespaces are disabled.

+
+

uts

+

string

+

Set the UTS mode for the container

+
+
+

volume

+

aliases: volumes

+

list / elements=string

+

Create a bind mount. If you specify, volume /HOST-DIR:/CONTAINER-DIR, podman bind mounts /HOST-DIR in the host to /CONTAINER-DIR in the podman container.

+
+

volumes_from

+

list / elements=string

+

Mount volumes from the specified container(s).

+
+
+

workdir

+

aliases: working_dir

+

string

+

Working directory inside the container. The default working directory for running binaries within a container is the root directory (/).

+
+ +
+

Examples

+
- name: Run container
+  containers.podman.podman_container:
+    name: container
+    image: quay.io/bitnami/wildfly
+    state: started
 
-                            
-                                                            
-                
- mac_address - -
- string -
- - - - -
Specify a MAC address for the container, for example '92:d0:c6:0a:29:33'. Don't forget that it must be unique within one Ethernet network.
- - - - -
- memory - -
- string -
- - - - -
Memory limit (format 10k, where unit = b, k, m or g) Note - idempotency is supported for integers only.
- - - - -
- memory_reservation - -
- string -
- - - - -
Memory soft limit (format 100m, where unit = b, k, m or g) Note - idempotency is supported for integers only.
- - - - -
- memory_swap - -
- string -
- - - - -
A limit value equal to memory plus swap. Must be used with the -m (--memory) flag. The swap LIMIT should always be larger than -m (--memory) value. By default, the swap LIMIT will be set to double the value of --memory Note - idempotency is supported for integers only.
- - - - -
- memory_swappiness - -
- integer -
- - - - -
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
- - - - -
- mount - -
- list - / elements=string
- - - - -
Attach a filesystem mount to the container. bind or tmpfs For example mount "type=bind,source=/path/on/host,destination=/path/in/container"
-

aliases: mounts
- - - - -
- name - -
- string - / required
- - - - -
Name of the container
- - - - -
- network - -
- list - / elements=string
- - - - -
Set the Network mode for the container * bridge create a network stack on the default bridge * none no networking * container:<name|id> reuse another container's network stack * host use the podman host network stack. * <network-name>|<network-id> connect to a user-defined network * ns:<path> path to a network namespace to join * slirp4netns use slirp4netns to create a user network stack. This is the default for rootless containers
-

aliases: net, network_mode
- - - - -
- network_aliases - -
- list - / elements=string
- - - - -
Add network-scoped alias for the container. A container will only have access to aliases on the first network that it joins. This is a limitation that will be removed in a later release.
- - - - -
- no_hosts - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Do not create /etc/hosts for the container Default is false.
- - - - -
- oom_kill_disable - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Whether to disable OOM Killer for the container or not. Default is false.
- - - - -
- oom_score_adj - -
- integer -
- - - - -
Tune the host's OOM preferences for containers (accepts -1000 to 1000)
- - - - -
- pid - -
- string -
- - - - -
Set the PID mode for the container
-

aliases: pid_mode
- - - - -
- pids_limit - -
- string -
- - - - -
Tune the container's PIDs limit. Set -1 to have unlimited PIDs for the container.
- - - - -
- pod - -
- string -
- - - - -
Run container in an existing pod. If you want podman to make the pod for you, prefix the pod name with "new:"
- - - - -
- privileged - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Give extended privileges to this container. The default is false.
- - - - -
- publish - -
- list - / elements=string
- - - - -
Publish a container's port, or range of ports, to the host. Format - ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort In case of only containerPort is set, the hostPort will chosen randomly by Podman.
-

aliases: ports, published, published_ports
- - - - -
- publish_all - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Publish all exposed ports to random ports on the host interfaces. The default is false.
- - - - -
- read_only - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Mount the container's root filesystem as read only. Default is false
- - - - -
- read_only_tmpfs - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
If container is running in --read-only mode, then mount a read-write tmpfs on /run, /tmp, and /var/tmp. The default is true
- - - - -
- recreate - -
- boolean -
- - -
    Choices: -
  • no ←
  • -
  • yes
  • -
- - -
Use with present and started states to force the re-creation of an existing container.
- - - - -
- requires - -
- list - / elements=string
- - - - -
Specify one or more requirements. A requirement is a dependency container that will be started before this container. Containers can be specified by name or ID.
- - - - -
- restart_policy - -
- string -
- - - - -
Restart policy to follow when containers exit. Restart policy will not take effect if a container is stopped via the podman kill or podman stop commands. Valid values are * no - Do not restart containers on exit * on-failure[:max_retries] - Restart containers when they exit with a non-0 exit code, retrying indefinitely or until the optional max_retries count is hit * always - Restart containers when they exit, regardless of status, retrying indefinitely
- - - - -
- rm - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Automatically remove the container when it exits. The default is false.
-

aliases: remove, auto_remove
- - - - -
- rootfs - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
If true, the first argument refers to an exploded container on the file system. The default is false.
- - - - -
- sdnotify - -
- string -
- - - - -
Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify. Can be container, conmon, ignore.
- - - - -
- secrets - -
- list - / elements=string
- - - - -
Add the named secrets into the container. The format is secret[,opt=opt...], see documentation for more details.
- - - - -
- security_opt - -
- list - / elements=string
- - - - -
Security Options. For example security_opt "seccomp=unconfined"
- - - - -
- shm_size - -
- string -
- - - - -
Size of /dev/shm. The format is <number><unit>. number must be greater than 0. Unit is optional and can be b (bytes), k (kilobytes), m(megabytes), or g (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses 64m
- - - - -
- sig_proxy - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Proxy signals sent to the podman run command to the container process. SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is true.
- - - - -
- state - -
- string -
- - -
    Choices: -
  • absent
  • -
  • present
  • -
  • stopped
  • -
  • started ←
  • -
  • created
  • -
- - -
absent - A container matching the specified name will be stopped and removed.
-
present - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config. Image version will be taken into account when comparing configuration. Use the recreate option to force the re-creation of the matching container.
-
started - Asserts there is a running container matching the name and any provided configuration. If no container matches the name, a container will be created and started. Use recreate to always re-create a matching container, even if it is running. Use force_restart to force a matching container to be stopped and restarted.
-
stopped - Asserts that the container is first present, and then if the container is running moves it to a stopped state.
-
created - Asserts that the container exists with given configuration. If container doesn't exist, the module creates it and leaves it in 'created' state. If configuration doesn't match or 'recreate' option is set, the container will be recreated
- - - - -
- stop_signal - -
- integer -
- - - - -
Signal to stop a container. Default is SIGTERM.
- - - - -
- stop_timeout - -
- integer -
- - - - -
Timeout (in seconds) to stop a container. Default is 10.
- - - - -
- subgidname - -
- string -
- - - - -
Run the container in a new user namespace using the map with 'name' in the /etc/subgid file.
- - - - -
- subuidname - -
- string -
- - - - -
Run the container in a new user namespace using the map with 'name' in the /etc/subuid file.
- - - - -
- sysctl - -
- dictionary -
- - - - -
Configure namespaced kernel parameters at runtime
- - - - -
- systemd - -
- string -
- - - - -
Run container in systemd mode. The default is true.
- - - - -
- timezone - -
- string -
- - - - -
Set timezone in container. This flag takes area-based timezones, GMT time, as well as local, which sets the timezone in the container to match the host machine. See /usr/share/zoneinfo/ for valid timezones. Remote connections use local containers.conf for defaults.
- - - - -
- tmpfs - -
- dictionary -
- - - - -
Create a tmpfs mount. For example tmpfs "/tmp" "rw,size=787448k,mode=1777"
- - - - -
- tty - -
- boolean -
- - -
    Choices: -
  • no
  • -
  • yes
  • -
- - -
Allocate a pseudo-TTY. The default is false.
- - - - -
- uidmap - -
- list - / elements=string
- - - - -
Run the container in a new user namespace using the supplied mapping.
- - - - -
- ulimit - -
- list - / elements=string
- - - - -
Ulimit options
-

aliases: ulimits
- - - - -
- user - -
- string -
- - - - -
Sets the username or UID used and optionally the groupname or GID for the specified command.
- - - - -
- userns - -
- string -
- - - - -
Set the user namespace mode for the container. It defaults to the PODMAN_USERNS environment variable. An empty value means user namespaces are disabled.
-

aliases: userns_mode
- - - - -
- uts - -
- string -
- - - - -
Set the UTS mode for the container
- - - - -
- volume - -
- list - / elements=string
- - - - -
Create a bind mount. If you specify, volume /HOST-DIR:/CONTAINER-DIR, podman bind mounts /HOST-DIR in the host to /CONTAINER-DIR in the podman container.
-

aliases: volumes
- - - - -
- volumes_from - -
- list - / elements=string
- - - - -
Mount volumes from the specified container(s).
- - - - -
- workdir - -
- string -
- - - - -
Working directory inside the container. The default working directory for running binaries within a container is the root directory (/).
-

aliases: working_dir
- - - -
-
-

Examples

-
- name: Run container
-  containers.podman.podman_container:
-    name: container
-    image: quay.io/bitnami/wildfly
-    state: started
+- name: Create a data container
+  containers.podman.podman_container:
+    name: mydata
+    image: busybox
+    volume:
+      - /tmp/data
 
-- name: Create a data container
-  containers.podman.podman_container:
-    name: mydata
-    image: busybox
-    volume:
-      - /tmp/data
+- name: Re-create a redis container with systemd service file generated in /tmp/
+  containers.podman.podman_container:
+    name: myredis
+    image: redis
+    command: redis-server --appendonly yes
+    state: present
+    recreate: true
+    expose:
+      - 6379
+    volumes_from:
+      - mydata
+    generate_systemd:
+      path: /tmp/
+      restart_policy: always
+      stop_timeout: 120
+      names: true
+      container_prefix: ainer
 
-- name: Re-create a redis container with systemd service file generated in /tmp/
-  containers.podman.podman_container:
-    name: myredis
-    image: redis
-    command: redis-server --appendonly yes
-    state: present
-    recreate: yes
-    expose:
-      - 6379
-    volumes_from:
-      - mydata
-    generate_systemd:
-      path: /tmp/
-      restart_policy: always
-      time: 120
-      names: true
-      container_prefix: ainer
+- name: Restart a container
+  containers.podman.podman_container:
+    name: myapplication
+    image: redis
+    state: started
+    restart: true
+    etc_hosts:
+        other: "127.0.0.1"
+    restart_policy: "no"
+    device: "/dev/sda:/dev/xvda:rwm"
+    ports:
+        - "8080:9000"
+        - "127.0.0.1:8081:9001/udp"
+    env:
+        SECRET_KEY: "ssssh"
+        BOOLEAN_KEY: "yes"
 
-- name: Restart a container
-  containers.podman.podman_container:
-    name: myapplication
-    image: redis
-    state: started
-    restart: yes
-    etc_hosts:
-        other: "127.0.0.1"
-    restart_policy: "no"
-    device: "/dev/sda:/dev/xvda:rwm"
-    ports:
-        - "8080:9000"
-        - "127.0.0.1:8081:9001/udp"
-    env:
-        SECRET_KEY: "ssssh"
-        BOOLEAN_KEY: "yes"
+- name: Container present
+  containers.podman.podman_container:
+    name: mycontainer
+    state: present
+    image: ubuntu:14.04
+    command: "sleep 1d"
 
-- name: Container present
-  containers.podman.podman_container:
-    name: mycontainer
-    state: present
-    image: ubuntu:14.04
-    command: "sleep 1d"
+- name: Stop a container
+  containers.podman.podman_container:
+    name: mycontainer
+    state: stopped
 
-- name: Stop a container
-  containers.podman.podman_container:
-    name: mycontainer
-    state: stopped
+- name: Start 4 load-balanced containers
+  containers.podman.podman_container:
+    name: "container{{ item }}"
+    recreate: true
+    image: someuser/anotherappimage
+    command: sleep 1d
+  with_sequence: count=4
 
-- name: Start 4 load-balanced containers
-  containers.podman.podman_container:
-    name: "container{{ item }}"
-    recreate: yes
-    image: someuser/anotherappimage
-    command: sleep 1d
-  with_sequence: count=4
+- name: remove container
+  containers.podman.podman_container:
+    name: ohno
+    state: absent
 
-- name: remove container
-  containers.podman.podman_container:
-    name: ohno
-    state: absent
+- name: Writing output
+  containers.podman.podman_container:
+    name: myservice
+    image: busybox
+    log_options: path=/var/log/container/mycontainer.json
+    log_driver: k8s-file
 
-- name: Writing output
-  containers.podman.podman_container:
-    name: myservice
-    image: busybox
-    log_options: path=/var/log/container/mycontainer.json
-    log_driver: k8s-file
+- name: Run container with complex command with quotes
+  containers.podman.podman_container:
+    name: mycontainer
+    image: certbot/certbot
+    command:
+      - renew
+      - --deploy-hook
+      - "echo 1 > /var/lib/letsencrypt/complete"
 
-
-
+
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- container - -
- dictionary -
-
always -
Facts representing the current state of the container. Matches the podman inspection output.
-
Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts are also accessible directly as podman_container. Note that the returned fact will be removed in Ansible 2.12.
-
Empty if state is absent.
-
-
Sample:
-
{ "AppArmorProfile": "", "Args": [ "sh" ], "BoundingCaps": [ "CAP_CHOWN", ... ], "Config": { "Annotations": { "io.kubernetes.cri-o.ContainerType": "sandbox", "io.kubernetes.cri-o.TTY": "false" }, "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": [ "sh" ], "Domainname": "", "Entrypoint": "", "Env": [ "PATH=/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "HOSTNAME=", "container=podman" ], "Hostname": "", "Image": "docker.io/library/busybox:latest", "Labels": null, "OpenStdin": false, "StdinOnce": false, "StopSignal": 15, "Tty": false, "User": { "gid": 0, "uid": 0 }, "Volumes": null, "WorkingDir": "/" }, "ConmonPidFile": "...", "Created": "2019-06-17T19:13:09.873858307+03:00", "Dependencies": [], "Driver": "overlay", "EffectiveCaps": [ "CAP_CHOWN", ... ], "ExecIDs": [], "ExitCommand": [ "/usr/bin/podman", "--root", ... ], "GraphDriver": { ... }, "HostConfig": { ... }, "HostnamePath": "...", "HostsPath": "...", "ID": "...", "Image": "...", "ImageName": "docker.io/library/busybox:latest", "IsInfra": false, "LogPath": "/tmp/container/mycontainer.json", "MountLabel": "system_u:object_r:container_file_t:s0:c282,c782", "Mounts": [ ... ], "Name": "myservice", "Namespace": "", "NetworkSettings": { "Bridge": "", ... }, "Path": "sh", "ProcessLabel": "system_u:system_r:container_t:s0:c282,c782", "ResolvConfPath": "...", "RestartCount": 0, "Rootfs": "", "State": { "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "2019-06-17T19:13:10.157518963+03:00", "Healthcheck": { "FailingStreak": 0, "Log": null, "Status": "" }, "OOMKilled": false, "OciVersion": "1.0.1-dev", "Paused": false, "Pid": 4083, "Restarting": false, "Running": false, "StartedAt": "2019-06-17T19:13:10.152479729+03:00", "Status": "exited" }, "StaticDir": "..." ... }
-
-

+ + + + + + + + + + + +

Key

Description

+

container

+

dictionary

+

Facts representing the current state of the container. Matches the podman inspection output.

+

Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts are also accessible directly as podman_container. Note that the returned fact will be removed in Ansible 2.12.

+

Empty if state is absent.

+

Returned: always

+

Sample: "{ \"AppArmorProfile\": \"\", \"Args\": [ \"sh\" ], \"BoundingCaps\": [ \"CAP_CHOWN\", ... ], \"Config\": { \"Annotations\": { \"io.kubernetes.cri-o.ContainerType\": \"sandbox\", \"io.kubernetes.cri-o.TTY\": \"false\" }, \"AttachStderr\": false, \"AttachStdin\": false, \"AttachStdout\": false, \"Cmd\": [ \"sh\" ], \"Domainname\": \"\", \"Entrypoint\": \"\", \"Env\": [ \"PATH=/usr/sbin:/usr/bin:/sbin:/bin\", \"TERM=xterm\", \"HOSTNAME=\", \"container=podman\" ], \"Hostname\": \"\", \"Image\": \"docker.io/library/busybox:latest\", \"Labels\": null, \"OpenStdin\": false, \"StdinOnce\": false, \"StopSignal\": 15, \"Tty\": false, \"User\": { \"gid\": 0, \"uid\": 0 }, \"Volumes\": null, \"WorkingDir\": \"/\" }, \"ConmonPidFile\": \"...\", \"Created\": \"2019-06-17T19:13:09.873858307+03:00\", \"Dependencies\": [], \"Driver\": \"overlay\", \"EffectiveCaps\": [ \"CAP_CHOWN\", ... ], \"ExecIDs\": [], \"ExitCommand\": [ \"/usr/bin/podman\", \"--root\", ... ], \"GraphDriver\": { ... }, \"HostConfig\": { ... }, \"HostnamePath\": \"...\", \"HostsPath\": \"...\", \"ID\": \"...\", \"Image\": \"...\", \"ImageName\": \"docker.io/library/busybox:latest\", \"IsInfra\": false, \"LogPath\": \"/tmp/container/mycontainer.json\", \"MountLabel\": \"system_u:object_r:container_file_t:s0:c282,c782\", \"Mounts\": [ ... ], \"Name\": \"myservice\", \"Namespace\": \"\", \"NetworkSettings\": { \"Bridge\": \"\", ... }, \"Path\": \"sh\", \"ProcessLabel\": \"system_u:system_r:container_t:s0:c282,c782\", \"ResolvConfPath\": \"...\", \"RestartCount\": 0, \"Rootfs\": \"\", \"State\": { \"Dead\": false, \"Error\": \"\", \"ExitCode\": 0, \"FinishedAt\": \"2019-06-17T19:13:10.157518963+03:00\", \"Healthcheck\": { \"FailingStreak\": 0, \"Log\": null, \"Status\": \"\" }, \"OOMKilled\": false, \"OciVersion\": \"1.0.1-dev\", \"Paused\": false, \"Pid\": 4083, \"Restarting\": false, \"Running\": false, \"StartedAt\": \"2019-06-17T19:13:10.152479729+03:00\", \"Status\": \"exited\" }, \"StaticDir\": \"...\" ... }"

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -2270,11 +1431,48 @@

Navigation

+ + + @@ -2304,8 +1502,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_containers – Manage podman containers in a batch — Python documentation + + + + containers.podman.podman_containers module – Manage podman containers in a batch — Python documentation - - - + + + @@ -32,105 +33,101 @@
-
-

containers.podman.podman_containers – Manage podman containers in a batch

+
+

containers.podman.podman_containers module – Manage podman containers in a batch

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_containers.

-
-

New in version 1.4.0: of containers.podman

-
-
+

New in containers.podman 1.4.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Manage groups of podman containers

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- containers - -
- list - / elements=dictionary / required
-
- -
List of dictionaries with data for running containers for podman_container module.
-
-
- debug - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return additional information which can be helpful for investigations.
-
-
-
-

Examples

-
- name: Run three containers at once
-  podman_containers:
-    containers:
-      - name: alpine
-        image: alpine
-        command: sleep 1d
-      - name: web
-        image: nginx
-      - name: test
-        image: python:3-alpine
-        command: python -V
+
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

containers

+

list / elements=dictionary / required

+

List of dictionaries with data for running containers for podman_container module.

+
+

debug

+

boolean

+

Return additional information which can be helpful for investigations.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+
+
+

Examples

+
- name: Run three containers at once
+  podman_containers:
+    containers:
+      - name: alpine
+        image: alpine
+        command: sleep 1d
+      - name: web
+        image: nginx
+      - name: test
+        image: python:3.10-alpine
+        command: python -V
 
-
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -149,11 +146,48 @@

Navigation

+ + + @@ -183,8 +217,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_export – Export a podman container — Python documentation + + + + containers.podman.podman_export module – Export a podman container — Python documentation - - - + + + @@ -32,126 +33,118 @@
-
-

containers.podman.podman_export – Export a podman container

+
+

containers.podman.podman_export module – Export a podman container

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_export.

- -
-

Synopsis

+ +
+

Synopsis

  • podman export exports the filesystem of a container and saves it as a tarball on the local machine

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- container - -
- string - / required
-
- -
Container to export.
-
-
- dest - -
- string - / required
-
- -
Path to export container to.
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Force saving to file even if it exists.
-
-
-
-

Examples

-
# What modules does for example
-- containers.podman.podman_export:
-    dest: /path/to/tar/file
-    container: container-name
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

container

+

string

+

Container to export.

+
+

dest

+

string / required

+

Path to export container to.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

force

+

boolean

+

Force saving to file even if it exists.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

volume

+

string

+

Volume to export.

+
+
+
+

Examples

+
# What modules does for example
+- containers.podman.podman_export:
+    dest: /path/to/tar/file
+    container: container-name
+- containers.podman.podman_export:
+    dest: /path/to/tar/file
+    volume: volume-name
 
-
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -170,11 +163,48 @@

Navigation

+ + + @@ -204,8 +234,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_generate_systemd – Generate systemd unit from a pod or a container — Python documentation + + + + containers.podman.podman_generate_systemd module – Generate systemd unit from a pod or a container — Python documentation - - - + + + @@ -32,15 +33,19 @@
-
-

containers.podman.podman_generate_systemd – Generate systemd unit from a pod or a container

+
+

containers.podman.podman_generate_systemd module – Generate systemd unit from a pod or a container

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_generate_systemd.

-
+
-
-

Synopsis

+ +
+

Synopsis

  • Generate systemd .service unit file(s) from a pod or a container

  • Support Ansible check mode

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on target host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- after - -
- list - / elements=string
-
- -
Add the systemd unit after (After=) option, that ordering dependencies between the list of dependencies and this service.
-
This option may be specified more than once.
-
User-defined dependencies will be appended to the generated unit file
-
But any existing options such as needed or defined by default (e.g. online.target) will not be removed or overridden.
-
Only with Podman 4.0.0 and above
-
-
- container_prefix - -
- string -
-
- -
Set the systemd unit name prefix for containers.
-
If not set, use the default defined by podman, container.
-
Refer to podman-generate-systemd(1) man page for more information.
-
-
- dest - -
- path -
-
- -
Destination of the generated systemd unit file(s)
-
-
- env - -
- dictionary -
-
- -
Set environment variables to the systemd unit files.
-
Keys are the environment variable names, and values are the environment variable values
-
Only with Podman 4.3.0 and above
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Podman executable name or full path
-
-
- name - -
- string - / required
-
- -
Name of the pod or container to export
-
-
- new - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Generate unit files that create containers and pods, not only start them.
-
Refer to podman-generate-systemd(1) man page for more information.
-
-
- no_header - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Do not generate the header including meta data such as the Podman version and the timestamp.
-
-
- pod_prefix - -
- string -
-
- -
Set the systemd unit name prefix for pods.
-
If not set, use the default defined by podman, pod.
-
Refer to podman-generate-systemd(1) man page for more information.
-
-
- requires - -
- list - / elements=string
-
- -
Set the systemd unit requires (Requires=) option.
-
Similar to wants, but declares a stronger requirement dependency.
-
Only with Podman 4.0.0 and above
-
-
- restart_policy - -
- string -
-
-
    Choices: -
  • no-restart
  • -
  • on-success
  • -
  • on-failure
  • -
  • on-abnormal
  • -
  • on-watchdog
  • -
  • on-abort
  • -
  • always
  • -
-
-
Restart policy of the service
-
-
- restart_sec - -
- integer -
-
- -
Configures the time to sleep before restarting a service (as configured with restart-policy).
-
Takes a value in seconds.
-
Only with Podman 4.0.0 and above
-
-
- separator - -
- string -
-
- -
Systemd unit name separator between the name/id of a container/pod and the prefix.
-
If not set, use the default defined by podman, -.
-
Refer to podman-generate-systemd(1) man page for more information.
-
-
- start_timeout - -
- integer -
-
- -
Override the default start timeout for the container with the given value in seconds.
-
Only with Podman 4.0.0 and above
-
-
- stop_timeout - -
- integer -
-
- -
Override the default stop timeout for the container with the given value in seconds.
-
-
- use_names - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Use name of the containers for the start, stop, and description in the unit file.
-
-
- wants - -
- list - / elements=string
-
- -
Add the systemd unit wants (Wants=) option, that this service is (weak) dependent on.
-
This option may be specified more than once.
-
This option does not influence the order in which services are started or stopped.
-
User-defined dependencies will be appended to the generated unit file
-
But any existing options such as needed or defined by default (e.g. online.target) will not be removed or overridden.
-
Only with Podman 4.0.0 and above
-
-
-
-

Notes

+ +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

after

+

list / elements=string

+

Add the systemd unit after (After=) option, that ordering dependencies between the list of dependencies and this service.

+

This option may be specified more than once.

+

User-defined dependencies will be appended to the generated unit file

+

But any existing options such as needed or defined by default (e.g. online.target) will not be removed or overridden.

+

Only with Podman 4.0.0 and above

+
+

container_prefix

+

string

+

Set the systemd unit name prefix for containers.

+

If not set, use the default defined by podman, container.

+

Refer to podman-generate-systemd(1) man page for more information.

+
+

dest

+

path

+

Destination of the generated systemd unit file(s).

+

Use /etc/systemd/system for the system-wide systemd instance.

+

Use /etc/systemd/user or ~/.config/systemd/user for use with per-user instances of systemd.

+
+

env

+

dictionary

+

Set environment variables to the systemd unit files.

+

Keys are the environment variable names, and values are the environment variable values

+

Only with Podman 4.3.0 and above

+
+

executable

+

string

+

Podman executable name or full path

+

Default: "podman"

+
+

force

+

boolean

+

Replace the systemd unit file(s) even if it already exists.

+

This works with dest option.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

name

+

string / required

+

Name of the pod or container to export

+
+

new

+

boolean

+

Generate unit files that create containers and pods, not only start them.

+

Refer to podman-generate-systemd(1) man page for more information.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

no_header

+

boolean

+

Do not generate the header including meta data such as the Podman version and the timestamp.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

pod_prefix

+

string

+

Set the systemd unit name prefix for pods.

+

If not set, use the default defined by podman, pod.

+

Refer to podman-generate-systemd(1) man page for more information.

+
+

requires

+

list / elements=string

+

Set the systemd unit requires (Requires=) option.

+

Similar to wants, but declares a stronger requirement dependency.

+

Only with Podman 4.0.0 and above

+
+

restart_policy

+

string

+

Restart policy of the service

+

Choices:

+
    +
  • "no-restart"

  • +
  • "on-success"

  • +
  • "on-failure"

  • +
  • "on-abnormal"

  • +
  • "on-watchdog"

  • +
  • "on-abort"

  • +
  • "always"

  • +
+
+

restart_sec

+

integer

+

Configures the time to sleep before restarting a service (as configured with restart-policy).

+

Takes a value in seconds.

+

Only with Podman 4.0.0 and above

+
+

separator

+

string

+

Systemd unit name separator between the name/id of a container/pod and the prefix.

+

If not set, use the default defined by podman, -.

+

Refer to podman-generate-systemd(1) man page for more information.

+
+

start_timeout

+

integer

+

Override the default start timeout for the container with the given value in seconds.

+

Only with Podman 4.0.0 and above

+
+

stop_timeout

+

integer

+

Override the default stop timeout for the container with the given value in seconds.

+
+

use_names

+

boolean

+

Use name of the containers for the start, stop, and description in the unit file.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

wants

+

list / elements=string

+

Add the systemd unit wants (Wants=) option, that this service is (weak) dependent on.

+

This option may be specified more than once.

+

This option does not influence the order in which services are started or stopped.

+

User-defined dependencies will be appended to the generated unit file

+

But any existing options such as needed or defined by default (e.g. online.target) will not be removed or overridden.

+

Only with Podman 4.0.0 and above

+
+
+
+

Notes

Note

    -
  • You can store your systemd unit files in /etc/systemd/user/ for system wide usage

  • -
  • Or you can store them in ~/.config/systemd/user/ for usage at a specific user

  • If you indicate a pod, the systemd units for it and all its containers will be generated

  • Create all your pods, containers and their dependencies before generating the systemd files

  • -
  • If a container or pod is already started before you do a systemctl daemon reload, systemd will not see the container or pod as started

  • -
  • Stop your container or pod before you do a systemctl daemon reload, then you can start them with systemctl start my_container.service

  • +
  • If a container or pod is already started before you do a systemctl daemon-reload, systemd will not see the container or pod as started

  • +
  • Stop your container or pod before you do a systemctl daemon-reload, then you can start them with systemctl start my_container.service

-
-
-

Examples

-
# Exemple of creating a container and integrate it into systemd
-- name: A postgres container must exist, stopped
-  containers.podman.podman_container:
-    name: postgres_local
-    image: docker.io/library/postgres:latest
-    state: stopped
-
-- name: Systemd unit files for postgres container must exist
-  containers.podman.podman_generate_systemd:
-    name: postgres_local
-    dest: ~/.config/systemd/user/
-
-- name: Postgres container must be started and enabled on systemd
-  ansible.builtin.systemd:
-    name: container-postgres_local
-    daemon_reload: yes
-    state: started
-    enabled: yes
-
-
-# Generate the unit files, but store them on an Ansible variable
-# instead of writting them on target host
-- name: Systemd unit files for postgres container must be generated
-  containers.podman.podman_generate_systemd:
-    name: postgres_local
-  register: postgres_local_systemd_unit
-
-# Generate the unit files with environment variables sets
-- name: Systemd unit files for postgres container must be generated
-  containers.podman.podman_generate_systemd:
-    name: postgres_local
-    env:
-      POSTGRES_USER: my_app
-      POSTGRES_PASSWORD: example
-  register: postgres_local_systemd_unit
+
+
+

Examples

+
# Example of creating a container and systemd unit file.
+# When using podman_generate_systemd with new:true then
+# the container needs rm:true for idempotence.
+- name: Create postgres container
+  containers.podman.podman_container:
+    name: postgres
+    image: docker.io/library/postgres:latest
+    rm: true
+    state: created
+
+- name: Generate systemd unit file for postgres container
+  containers.podman.podman_generate_systemd:
+    name: postgres
+    new: true
+    no_header: true
+    dest: /etc/systemd/system
+
+- name: Ensure postgres container is started and enabled
+  ansible.builtin.systemd:
+    name: container-postgres
+    daemon_reload: true
+    state: started
+    enabled: true
+
+
+# Example of creating a container and integrate it into systemd
+- name: A postgres container must exist, stopped
+  containers.podman.podman_container:
+    name: postgres_local
+    image: docker.io/library/postgres:latest
+    state: stopped
+
+- name: Systemd unit files for postgres container must exist
+  containers.podman.podman_generate_systemd:
+    name: postgres_local
+    dest: ~/.config/systemd/user/
+
+- name: Postgres container must be started and enabled on systemd
+  ansible.builtin.systemd:
+    name: container-postgres_local
+    daemon_reload: true
+    state: started
+    enabled: true
+
+
+# Generate the unit files, but store them on an Ansible variable
+# instead of writing them on target host
+- name: Systemd unit files for postgres container must be generated
+  containers.podman.podman_generate_systemd:
+    name: postgres_local
+  register: postgres_local_systemd_unit
+
+# Generate the unit files with environment variables sets
+- name: Systemd unit files for postgres container must be generated
+  containers.podman.podman_generate_systemd:
+    name: postgres_local
+    env:
+      POSTGRES_USER: my_app
+      POSTGRES_PASSWORD: example
+  register: postgres_local_systemd_unit
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- podman_command - -
- string -
-
always -
A copy of the podman command used to generate the systemd unit(s)
-
-
Sample:
-
podman generate systemd my_webapp
-
-
- systemd_units - -
- dictionary -
-
always -
A copy of the generated systemd .service unit(s)
-
-
Sample:
-
{'container-postgres_local': ' #Content of the systemd .servec unit for postgres_local container', 'pod-my_webapp': ' #Content of the systemd .servec unit for my_webapp pod'}
-
-

+ + + + + + + + + + + + + + +

Key

Description

+

podman_command

+

string

+

A copy of the podman command used to generate the systemd unit(s)

+

Returned: always

+

Sample: "podman generate systemd my_webapp"

+
+

systemd_units

+

dictionary

+

A copy of the generated systemd .service unit(s)

+

Returned: always

+

Sample: {"container-postgres_local": " #Content of the systemd .servec unit for postgres_local container", "pod-my_webapp": " #Content of the systemd .servec unit for my_webapp pod"}

+
+

Authors

  • Sébastien Gendre (@CyberFox001)

-
-
-
+ + + +
@@ -498,11 +404,48 @@

Navigation

+ + + @@ -532,8 +475,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_image_info – Gather info about images using podman — Python documentation + + + + containers.podman.podman_image_info module – Gather info about images using podman — Python documentation - - - + + + @@ -32,15 +33,17 @@
-
-

containers.podman.podman_image_info – Gather info about images using podman

+
+

containers.podman.podman_image_info module – Gather info about images using podman

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman.

To use it in a playbook, specify: containers.podman.podman_image_info.

-
+
-
-

Synopsis

+ +
+

Synopsis

  • Gather info about images using podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- name - -
- list - / elements=string
-
- -
List of tags or UID to gather info about. If no name is given return info about all images.
-
-
-
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

name

+

list / elements=string

+

List of tags or UID to gather info about. If no name is given return info about all images.

+
+
+
+

Notes

Note

  • Podman may required elevated privileges in order to run properly.

-
-
-

Examples

-
- name: Gather info for all images
-  containers.podman.podman_image_info:
-
-- name: Gather info on a specific image
-  containers.podman.podman_image_info:
-    name: nginx
-
-- name: Gather info on several images
-  containers.podman.podman_image_info:
-    name:
-      - redis
-      - quay.io/bitnami/wildfly
+
+
+

Examples

+
- name: Gather info for all images
+  containers.podman.podman_image_info:
+
+- name: Gather info on a specific image
+  containers.podman.podman_image_info:
+    name: nginx
+
+- name: Gather info on several images
+  containers.podman.podman_image_info:
+    name:
+      - redis
+      - quay.io/bitnami/wildfly
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- images - -
- dictionary -
-
always -
info from all or specified images
-
-
Sample:
-
[{'Annotations': {}, 'Architecture': 'amd64', 'Author': '', 'Comment': 'from Bitnami with love', 'ContainerConfig': {'Cmd': ['nami', 'start', '--foreground', 'wildfly'], 'Entrypoint': ['/app-entrypoint.sh'], 'Env': ['PATH=/opt/bitnami/java/bin:/opt/bitnami/wildfly/bin:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'IMAGE_OS=debian-9', 'NAMI_VERSION=0.0.9-0', 'GPG_KEY_SERVERS_LIST=ha.pool.sks-keyservers.net hkp://p80.pool.sks-keyservers.net:80 keyserver.ubuntu.com hkp://keyserver.ubuntu.com:80 pgp.mit.edu', 'TINI_VERSION=v0.13.2', 'TINI_GPG_KEY=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7', 'GOSU_VERSION=1.10', 'GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4', 'BITNAMI_IMAGE_VERSION=14.0.1-debian-9-r12', 'BITNAMI_APP_NAME=wildfly', 'WILDFLY_JAVA_HOME=', 'WILDFLY_JAVA_OPTS=', 'WILDFLY_MANAGEMENT_HTTP_PORT_NUMBER=9990', 'WILDFLY_PASSWORD=bitnami', 'WILDFLY_PUBLIC_CONSOLE=true', 'WILDFLY_SERVER_AJP_PORT_NUMBER=8009', 'WILDFLY_SERVER_HTTP_PORT_NUMBER=8080', 'WILDFLY_SERVER_INTERFACE=0.0.0.0', 'WILDFLY_USERNAME=user', 'WILDFLY_WILDFLY_HOME=/home/wildfly', 'WILDFLY_WILDFLY_OPTS=-Dwildfly.as.deployment.ondemand=false'], 'ExposedPorts': {'8080/tcp': {}, '9990/tcp': {}}, 'Labels': {'maintainer': 'Bitnami <containers@bitnami.com>'}}, 'Created': '2018-09-25T04:07:45.934395523Z', 'Digest': 'sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b', 'GraphDriver': {'Data': {'LowerDir': '/var/lib/containers/storage/overlay/a9dbf5616cc16919a8ac0dfc60aff87a72b5be52994c4649fcc91a089a12931f/diff:/var/lib/containers/storage/overlay/67129bd46022122a7d8b7acb490092af6c7ce244ce4fbd7d9e2d2b7f5979e090/diff:/var/lib/containers/storage/overlay/7c51242c4c5db5c74afda76d7fdbeab6965d8b21804bb3fc597dee09c770b0ca/diff:/var/lib/containers/storage/overlay/f97315dc58a9c002ba0cabccb9933d4b0d2113733d204188c88d72f75569b57b/diff:/var/lib/containers/storage/overlay/1dbde2dd497ddde2b467727125b900958a051a72561e58d29abe3d660dcaa9a7/diff:/var/lib/containers/storage/overlay/4aad9d80f30c3f0608f58173558b7554d84dee4dc4479672926eca29f75e6e33/diff:/var/lib/containers/storage/overlay/6751fc9b6868254870c062d75a511543fc8cfda2ce6262f4945f107449219632/diff:/var/lib/containers/storage/overlay/a27034d79081347421dd24d7e9e776c18271cd9a6e51053cb39af4d3d9c400e8/diff:/var/lib/containers/storage/overlay/537cf0045ed9cd7989f7944e7393019c81b16c1799a2198d8348cd182665397f/diff:/var/lib/containers/storage/overlay/27578615c5ae352af4e8449862d61aaf5c11b105a7d5905af55bd01b0c656d6e/diff:/var/lib/containers/storage/overlay/566542742840fe3034b3596f7cb9e62a6274c95a69f368f9e713746f8712c0b6/diff', 'MergedDir': '/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/merged', 'UpperDir': '/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/diff', 'WorkDir': '/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/work'}, 'Name': 'overlay'}, 'Id': 'bcacbdf7a119c0fa934661ca8af839e625ce6540d9ceb6827cdd389f823d49e0', 'Labels': {'maintainer': 'Bitnami <containers@bitnami.com>'}, 'ManifestType': 'application/vnd.docker.distribution.manifest.v1+prettyjws', 'Os': 'linux', 'Parent': '', 'RepoDigests': ['quay.io/bitnami/wildfly@sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b'], 'RepoTags': ['quay.io/bitnami/wildfly:latest'], 'RootFS': {'Layers': ['sha256:75391df2c87e076b0c2f72d20c95c57dc8be7ee684cc07273416cce622b43367', 'sha256:7dd303f041039bfe8f0833092673ac35f93137d10e0fbc4302021ea65ad57731', 'sha256:720d9edf0cd2a9bb56b88b80be9070dbfaad359514c70094c65066963fed485d', 'sha256:6a567ecbf97725501a634fcb486271999aa4591b633b4ae9932a46b40f5aaf47', 'sha256:59e9a6db8f178f3da868614564faabb2820cdfb69be32e63a4405d6f7772f68c', 'sha256:310a82ccb092cd650215ab375da8943d235a263af9a029b8ac26a281446c04db', 'sha256:36cb91cf4513543a8f0953fed785747ea18b675bc2677f3839889cfca0aac79e'], 'Type': 'layers'}, 'Size': 569919342, 'User': '', 'Version': '17.06.0-ce', 'VirtualSize': 569919342}]
-
-

+ + + + + + + + + + + +

Key

Description

+

images

+

dictionary

+

info from all or specified images

+

Returned: always

+

Sample: [{"Annotations": {}, "Architecture": "amd64", "Author": "", "Comment": "from Bitnami with love", "ContainerConfig": {"Cmd": ["nami", "start", "--foreground", "wildfly"], "Entrypoint": ["/app-entrypoint.sh"], "Env": ["PATH=/opt/bitnami/java/bin:/opt/bitnami/wildfly/bin:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "IMAGE_OS=debian-9", "NAMI_VERSION=0.0.9-0", "GPG_KEY_SERVERS_LIST=ha.pool.sks-keyservers.net hkp://p80.pool.sks-keyservers.net:80 keyserver.ubuntu.com hkp://keyserver.ubuntu.com:80 pgp.mit.edu", "TINI_VERSION=v0.13.2", "TINI_GPG_KEY=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7", "GOSU_VERSION=1.10", "GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4", "BITNAMI_IMAGE_VERSION=14.0.1-debian-9-r12", "BITNAMI_APP_NAME=wildfly", "WILDFLY_JAVA_HOME=", "WILDFLY_JAVA_OPTS=", "WILDFLY_MANAGEMENT_HTTP_PORT_NUMBER=9990", "WILDFLY_PASSWORD=bitnami", "WILDFLY_PUBLIC_CONSOLE=true", "WILDFLY_SERVER_AJP_PORT_NUMBER=8009", "WILDFLY_SERVER_HTTP_PORT_NUMBER=8080", "WILDFLY_SERVER_INTERFACE=0.0.0.0", "WILDFLY_USERNAME=user", "WILDFLY_WILDFLY_HOME=/home/wildfly", "WILDFLY_WILDFLY_OPTS=-Dwildfly.as.deployment.ondemand=false"], "ExposedPorts": {"8080/tcp": {}, "9990/tcp": {}}, "Labels": {"maintainer": "Bitnami <containers@bitnami.com>"}}, "Created": "2018-09-25T04:07:45.934395523Z", "Digest": "sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b", "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/a9dbf5616cc16919a8ac0dfc60aff87a72b5be52994c4649fcc91a089a12931f/diff:/var/lib/containers/storage/overlay/67129bd46022122a7d8b7acb490092af6c7ce244ce4fbd7d9e2d2b7f5979e090/diff:/var/lib/containers/storage/overlay/7c51242c4c5db5c74afda76d7fdbeab6965d8b21804bb3fc597dee09c770b0ca/diff:/var/lib/containers/storage/overlay/f97315dc58a9c002ba0cabccb9933d4b0d2113733d204188c88d72f75569b57b/diff:/var/lib/containers/storage/overlay/1dbde2dd497ddde2b467727125b900958a051a72561e58d29abe3d660dcaa9a7/diff:/var/lib/containers/storage/overlay/4aad9d80f30c3f0608f58173558b7554d84dee4dc4479672926eca29f75e6e33/diff:/var/lib/containers/storage/overlay/6751fc9b6868254870c062d75a511543fc8cfda2ce6262f4945f107449219632/diff:/var/lib/containers/storage/overlay/a27034d79081347421dd24d7e9e776c18271cd9a6e51053cb39af4d3d9c400e8/diff:/var/lib/containers/storage/overlay/537cf0045ed9cd7989f7944e7393019c81b16c1799a2198d8348cd182665397f/diff:/var/lib/containers/storage/overlay/27578615c5ae352af4e8449862d61aaf5c11b105a7d5905af55bd01b0c656d6e/diff:/var/lib/containers/storage/overlay/566542742840fe3034b3596f7cb9e62a6274c95a69f368f9e713746f8712c0b6/diff", "MergedDir": "/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/merged", "UpperDir": "/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/diff", "WorkDir": "/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/work"}, "Name": "overlay"}, "Id": "bcacbdf7a119c0fa934661ca8af839e625ce6540d9ceb6827cdd389f823d49e0", "Labels": {"maintainer": "Bitnami <containers@bitnami.com>"}, "ManifestType": "application/vnd.docker.distribution.manifest.v1+prettyjws", "Os": "linux", "Parent": "", "RepoDigests": ["quay.io/bitnami/wildfly@sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b"], "RepoTags": ["quay.io/bitnami/wildfly:latest"], "RootFS": {"Layers": ["sha256:75391df2c87e076b0c2f72d20c95c57dc8be7ee684cc07273416cce622b43367", "sha256:7dd303f041039bfe8f0833092673ac35f93137d10e0fbc4302021ea65ad57731", "sha256:720d9edf0cd2a9bb56b88b80be9070dbfaad359514c70094c65066963fed485d", "sha256:6a567ecbf97725501a634fcb486271999aa4591b633b4ae9932a46b40f5aaf47", "sha256:59e9a6db8f178f3da868614564faabb2820cdfb69be32e63a4405d6f7772f68c", "sha256:310a82ccb092cd650215ab375da8943d235a263af9a029b8ac26a281446c04db", "sha256:36cb91cf4513543a8f0953fed785747ea18b675bc2677f3839889cfca0aac79e"], "Type": "layers"}, "Size": 569919342, "User": "", "Version": "17.06.0-ce", "VirtualSize": 569919342}]

+
+

Authors

  • Sam Doran (@samdoran)

-
-
-
+ + + +
@@ -175,11 +165,48 @@

Navigation

+ + + @@ -209,8 +236,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_image – Pull images for use by podman — Python documentation + + + + containers.podman.podman_image module – Pull images for use by podman — Python documentation - - - + + + @@ -32,692 +33,505 @@
-
-

containers.podman.podman_image – Pull images for use by podman

+
+

containers.podman.podman_image module – Pull images for use by podman

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman.

To use it in a playbook, specify: containers.podman.podman_image.

- -
-

Synopsis

+ +
+

Synopsis

  • Build, pull, or push images using Podman.

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- auth_file - -
- path -
-
- -
Path to file containing authorization credentials to the remote registry.
-

aliases: authfile
-
-
- build - -
- dictionary -
-
- Default:
{}
-
-
Arguments that control image build.
-

aliases: build_args, buildargs
-
-
- annotation - -
- dictionary -
-
- -
Dictionary of key=value pairs to add to the image. Only works with OCI images. Ignored for Docker containers.
-
-
- cache - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to use cached layers when building an image
-
-
- extra_args - -
- string -
-
- -
Extra args to pass to build, if executed. Does not idempotently check for new build args.
-
-
- file - -
- path -
-
- -
Path to the Containerfile if it is not in the build context directory.
-
-
- force_rm - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Always remove intermediate containers after a build, even if the build is unsuccessful.
-
-
- format - -
- string -
-
-
    Choices: -
  • docker
  • -
  • oci ←
  • -
-
-
Format of the built image.
-
-
- rm - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Remove intermediate containers after a successful build
-
-
- volume - -
- list - / elements=string
-
- -
Specify multiple volume / mount options to mount one or more mounts to a container.
-
-
- ca_cert_dir - -
- path -
-
- -
Path to directory containing TLS certificates and keys to use.
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether or not to force push or pull an image.
-
When building, force the build even if the image already exists.
-
-
- name - -
- string - / required
-
- -
Name of the image to pull, push, or delete. It may contain a tag using the format image:tag.
-
-
- password - -
- string -
-
- -
Password to use when authenticating to remote registries.
-
-
- path - -
- string -
-
- -
Path to the build context directory.
-
-
- pull - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to pull the image.
-
-
- push - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether or not to push an image.
-
-
- push_args - -
- dictionary -
-
- Default:
{}
-
-
Arguments that control pushing images.
-
-
- compress - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Compress tarball image layers when pushing to a directory using the 'dir' transport.
-
-
- dest - -
- string -
-
- -
Path or URL where image will be pushed.
-

aliases: destination
-
-
- format - -
- string -
-
-
    Choices: -
  • oci
  • -
  • v2s1
  • -
  • v2s2
  • -
-
-
Manifest type to use when pushing an image using the 'dir' transport (default is manifest type of source).
-
-
- remove_signatures - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Discard any pre-existing signatures in the image
-
-
- sign_by - -
- string -
-
- -
Path to a key file to use to sign the image.
-
-
- transport - -
- string -
-
-
    Choices: -
  • dir
  • -
  • docker-archive
  • -
  • docker-daemon
  • -
  • oci-archive
  • -
  • ostree
  • -
-
-
Transport to use when pushing in image. If no transport is set, will attempt to push to a remote registry.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
  • build
  • -
-
-
Whether an image should be present, absent, or built.
-
-
- tag - -
- string -
-
- Default:
"latest"
-
-
Tag of the image to pull, push, or delete.
-
-
- username - -
- string -
-
- -
username to use when authenticating to remote registries.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Require HTTPS and validate certificates when pulling or pushing. Also used during build if a pull or push is necessary.
-

aliases: tlsverify, tls_verify
-
-
-
-

Examples

-
- name: Pull an image
-  containers.podman.podman_image:
-    name: quay.io/bitnami/wildfly
-
-- name: Remove an image
-  containers.podman.podman_image:
-    name: quay.io/bitnami/wildfly
-    state: absent
-
-- name: Remove an image with image id
-  containers.podman.podman_image:
-    name: 0e901e68141f
-    state: absent
-
-- name: Pull a specific version of an image
-  containers.podman.podman_image:
-    name: redis
-    tag: 4
-
-- name: Build a basic OCI image
-  containers.podman.podman_image:
-    name: nginx
-    path: /path/to/build/dir
-
-- name: Build a basic OCI image with advanced parameters
-  containers.podman.podman_image:
-    name: nginx
-    path: /path/to/build/dir
-    build:
-      cache: no
-      force_rm: yes
-      format: oci
-      annotation:
-        app: nginx
-        function: proxy
-        info: Load balancer for my cool app
-      extra_args: "--build-arg KEY=value"
-
-- name: Build a Docker formatted image
-  containers.podman.podman_image:
-    name: nginx
-    path: /path/to/build/dir
-    build:
-      format: docker
-
-- name: Build and push an image using existing credentials
-  containers.podman.podman_image:
-    name: nginx
-    path: /path/to/build/dir
-    push: yes
-    push_args:
-      dest: quay.io/acme
-
-- name: Build and push an image using an auth file
-  containers.podman.podman_image:
-    name: nginx
-    push: yes
-    auth_file: /etc/containers/auth.json
-    push_args:
-      dest: quay.io/acme
-
-- name: Build and push an image using username and password
-  containers.podman.podman_image:
-    name: nginx
-    push: yes
-    username: bugs
-    password: "{{ vault_registry_password }}"
-    push_args:
-      dest: quay.io/acme
-
-- name: Build and push an image to multiple registries
-  containers.podman.podman_image:
-    name: "{{ item }}"
-    path: /path/to/build/dir
-    push: yes
-    auth_file: /etc/containers/auth.json
-    loop:
-    - quay.io/acme/nginx
-    - docker.io/acme/nginx
-
-- name: Build and push an image to multiple registries with separate parameters
-  containers.podman.podman_image:
-    name: "{{ item.name }}"
-    tag: "{{ item.tag }}"
-    path: /path/to/build/dir
-    push: yes
-    auth_file: /etc/containers/auth.json
-    push_args:
-      dest: "{{ item.dest }}"
-    loop:
-    - name: nginx
-      tag: 4
-      dest: docker.io/acme
-
-    - name: nginx
-      tag: 3
-      dest: docker.io/acme
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

arch

+

string

+

CPU architecture for the container image

+
+
+

auth_file

+

aliases: authfile

+

path

+

Path to file containing authorization credentials to the remote registry.

+
+
+
+

build

+

aliases: build_args, buildargs

+

dictionary

+

Arguments that control image build.

+

Default: {}

+
+
+
+

annotation

+

dictionary

+

Dictionary of key=value pairs to add to the image. Only works with OCI images. Ignored for Docker containers.

+
+
+
+

cache

+

boolean

+

Whether or not to use cached layers when building an image

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+
+
+

extra_args

+

string

+

Extra args to pass to build, if executed. Does not idempotently check for new build args.

+
+
+
+

file

+

path

+

Path to the Containerfile if it is not in the build context directory.

+
+
+
+

force_rm

+

boolean

+

Always remove intermediate containers after a build, even if the build is unsuccessful.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+
+
+

format

+

string

+

Format of the built image.

+

Choices:

+
    +
  • "docker"

  • +
  • "oci" ← (default)

  • +
+
+
+
+

rm

+

boolean

+

Remove intermediate containers after a successful build

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+
+
+

target

+

string

+

Specify the target build stage to build.

+
+
+
+

volume

+

list / elements=string

+

Specify multiple volume / mount options to mount one or more mounts to a container.

+
+

ca_cert_dir

+

path

+

Path to directory containing TLS certificates and keys to use.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman.

+

Default: "podman"

+
+

force

+

boolean

+

Whether or not to force push or pull an image.

+

When building, force the build even if the image already exists.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

name

+

string / required

+

Name of the image to pull, push, or delete. It may contain a tag using the format image:tag.

+
+

password

+

string

+

Password to use when authenticating to remote registries.

+
+

path

+

string

+

Path to the build context directory.

+
+

pull

+

boolean

+

Whether or not to pull the image.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

push

+

boolean

+

Whether or not to push an image.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

push_args

+

dictionary

+

Arguments that control pushing images.

+

Default: {}

+
+

compress

+

boolean

+

Compress tarball image layers when pushing to a directory using the ‘dir’ transport.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+
+

dest

+

aliases: destination

+

string

+

Path or URL where image will be pushed.

+
+

format

+

string

+

Manifest type to use when pushing an image using the ‘dir’ transport (default is manifest type of source).

+

Choices:

+
    +
  • "oci"

  • +
  • "v2s1"

  • +
  • "v2s2"

  • +
+
+

remove_signatures

+

boolean

+

Discard any pre-existing signatures in the image

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

sign_by

+

string

+

Path to a key file to use to sign the image.

+
+

transport

+

string

+

Transport to use when pushing in image. If no transport is set, will attempt to push to a remote registry.

+

Choices:

+
    +
  • "dir"

  • +
  • "docker-archive"

  • +
  • "docker-daemon"

  • +
  • "oci-archive"

  • +
  • "ostree"

  • +
+
+

state

+

string

+

Whether an image should be present, absent, or built.

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
  • "build"

  • +
+
+

tag

+

string

+

Tag of the image to pull, push, or delete.

+

Default: "latest"

+
+

username

+

string

+

username to use when authenticating to remote registries.

+
+
+
+

validate_certs

+

aliases: tlsverify, tls_verify

+

boolean

+

Require HTTPS and validate certificates when pulling or pushing. Also used during build if a pull or push is necessary.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+
+
+

Examples

+
- name: Pull an image
+  containers.podman.podman_image:
+    name: quay.io/bitnami/wildfly
+
+- name: Remove an image
+  containers.podman.podman_image:
+    name: quay.io/bitnami/wildfly
+    state: absent
+
+- name: Remove an image with image id
+  containers.podman.podman_image:
+    name: 0e901e68141f
+    state: absent
+
+- name: Pull a specific version of an image
+  containers.podman.podman_image:
+    name: redis
+    tag: 4
+
+- name: Build a basic OCI image
+  containers.podman.podman_image:
+    name: nginx
+    path: /path/to/build/dir
+
+- name: Build a basic OCI image with advanced parameters
+  containers.podman.podman_image:
+    name: nginx
+    path: /path/to/build/dir
+    build:
+      cache: no
+      force_rm: true
+      format: oci
+      annotation:
+        app: nginx
+        function: proxy
+        info: Load balancer for my cool app
+      extra_args: "--build-arg KEY=value"
+
+- name: Build a Docker formatted image
+  containers.podman.podman_image:
+    name: nginx
+    path: /path/to/build/dir
+    build:
+      format: docker
+
+- name: Build and push an image using existing credentials
+  containers.podman.podman_image:
+    name: nginx
+    path: /path/to/build/dir
+    push: true
+    push_args:
+      dest: quay.io/acme
+
+- name: Build and push an image using an auth file
+  containers.podman.podman_image:
+    name: nginx
+    push: true
+    auth_file: /etc/containers/auth.json
+    push_args:
+      dest: quay.io/acme
+
+- name: Build and push an image using username and password
+  containers.podman.podman_image:
+    name: nginx
+    push: true
+    username: bugs
+    password: "{{ vault_registry_password }}"
+    push_args:
+      dest: quay.io/acme
+
+- name: Build and push an image to multiple registries
+  containers.podman.podman_image:
+    name: "{{ item }}"
+    path: /path/to/build/dir
+    push: true
+    auth_file: /etc/containers/auth.json
+    loop:
+    - quay.io/acme/nginx
+    - docker.io/acme/nginx
+
+- name: Build and push an image to multiple registries with separate parameters
+  containers.podman.podman_image:
+    name: "{{ item.name }}"
+    tag: "{{ item.tag }}"
+    path: /path/to/build/dir
+    push: true
+    auth_file: /etc/containers/auth.json
+    push_args:
+      dest: "{{ item.dest }}"
+    loop:
+    - name: nginx
+      tag: 4
+      dest: docker.io/acme
+
+    - name: nginx
+      tag: 3
+      dest: docker.io/acme
+
+- name: Pull an image for a specific CPU architecture
+  containers.podman.podman_image:
+    name: nginx
+    arch: amd64
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- image - -
- dictionary -
-
success -
Image inspection results for the image that was pulled, pushed, or built.
-
-
Sample:
-
[{'Annotations': {}, 'Architecture': 'amd64', 'Author': '', 'Comment': 'from Bitnami with love', 'ContainerConfig': {'Cmd': ['/run.sh'], 'Entrypoint': ['/app-entrypoint.sh'], 'Env': ['PATH=/opt/bitnami/java/bin:/opt/bitnami/wildfly/bin:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'IMAGE_OS=debian-9', 'NAMI_VERSION=1.0.0-1', 'GPG_KEY_SERVERS_LIST=ha.pool.sks-keyservers.net', 'TINI_VERSION=v0.13.2', 'TINI_GPG_KEY=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7', 'GOSU_VERSION=1.10', 'GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4', 'BITNAMI_IMAGE_VERSION=16.0.0-debian-9-r27', 'BITNAMI_PKG_CHMOD=-R g+rwX', 'BITNAMI_PKG_EXTRA_DIRS=/home/wildfly', 'HOME=/', 'BITNAMI_APP_NAME=wildfly', 'NAMI_PREFIX=/.nami', 'WILDFLY_HOME=/home/wildfly', 'WILDFLY_JAVA_HOME=', 'WILDFLY_JAVA_OPTS=', 'WILDFLY_MANAGEMENT_HTTP_PORT_NUMBER=9990', 'WILDFLY_PASSWORD=bitnami', 'WILDFLY_PUBLIC_CONSOLE=true', 'WILDFLY_SERVER_AJP_PORT_NUMBER=8009', 'WILDFLY_SERVER_HTTP_PORT_NUMBER=8080', 'WILDFLY_SERVER_INTERFACE=0.0.0.0', 'WILDFLY_USERNAME=user', 'WILDFLY_WILDFLY_HOME=/home/wildfly', 'WILDFLY_WILDFLY_OPTS=-Dwildfly.as.deployment.ondemand=false'], 'ExposedPorts': {'8080/tcp': {}, '9990/tcp': {}}, 'Labels': {'maintainer': 'Bitnami <containers@bitnami.com>'}, 'User': '1001'}, 'Created': '2019-04-10T05:48:03.553887623Z', 'Digest': 'sha256:5a8ab28e314c2222de3feaf6dac94a0436a37fc08979d2722c99d2bef2619a9b', 'GraphDriver': {'Data': {'LowerDir': '/var/lib/containers/storage/overlay/142c1beadf1bb09fbd929465ec98c9dca3256638220450efb4214727d0d0680e/diff:/var/lib/containers/s', 'MergedDir': '/var/lib/containers/storage/overlay/9aa10191f5bddb59e28508e721fdeb43505e5b395845fa99723ed787878dbfea/merged', 'UpperDir': '/var/lib/containers/storage/overlay/9aa10191f5bddb59e28508e721fdeb43505e5b395845fa99723ed787878dbfea/diff', 'WorkDir': '/var/lib/containers/storage/overlay/9aa10191f5bddb59e28508e721fdeb43505e5b395845fa99723ed787878dbfea/work'}, 'Name': 'overlay'}, 'History': [{'comment': 'from Bitnami with love', 'created': '2019-04-09T22:27:40.659377677Z'}, {'created': '2019-04-09T22:38:53.86336555Z', 'created_by': '/bin/sh -c #(nop) LABEL maintainer=Bitnami <containers@bitnami.com>', 'empty_layer': True}, {'created': '2019-04-09T22:38:54.022778765Z', 'created_by': '/bin/sh -c #(nop) ENV IMAGE_OS=debian-9', 'empty_layer': True}], 'Id': 'ace34da54e4af2145e1ad277005adb235a214e4dfe1114c2db9ab460b840f785', 'Labels': {'maintainer': 'Bitnami <containers@bitnami.com>'}, 'ManifestType': 'application/vnd.docker.distribution.manifest.v1+prettyjws', 'Os': 'linux', 'Parent': '', 'RepoDigests': ['quay.io/bitnami/wildfly@sha256:5a8ab28e314c2222de3feaf6dac94a0436a37fc08979d2722c99d2bef2619a9b'], 'RepoTags': ['quay.io/bitnami/wildfly:latest'], 'RootFS': {'Layers': ['', '', '', '', '', '', '', '', '', '', '', ''], 'Type': 'layers'}, 'Size': 466180019, 'User': '1001', 'Version': '18.09.3', 'VirtualSize': 466180019}]
-
-

+ + + + + + + + + + + +

Key

Description

+

image

+

dictionary

+

Image inspection results for the image that was pulled, pushed, or built.

+

Returned: success

+

Sample: [{"Annotations": {}, "Architecture": "amd64", "Author": "", "Comment": "from Bitnami with love", "ContainerConfig": {"Cmd": ["/run.sh"], "Entrypoint": ["/app-entrypoint.sh"], "Env": ["PATH=/opt/bitnami/java/bin:/opt/bitnami/wildfly/bin:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "IMAGE_OS=debian-9", "NAMI_VERSION=1.0.0-1", "GPG_KEY_SERVERS_LIST=ha.pool.sks-keyservers.net", "TINI_VERSION=v0.13.2", "TINI_GPG_KEY=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7", "GOSU_VERSION=1.10", "GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4", "BITNAMI_IMAGE_VERSION=16.0.0-debian-9-r27", "BITNAMI_PKG_CHMOD=-R g+rwX", "BITNAMI_PKG_EXTRA_DIRS=/home/wildfly", "HOME=/", "BITNAMI_APP_NAME=wildfly", "NAMI_PREFIX=/.nami", "WILDFLY_HOME=/home/wildfly", "WILDFLY_JAVA_HOME=", "WILDFLY_JAVA_OPTS=", "WILDFLY_MANAGEMENT_HTTP_PORT_NUMBER=9990", "WILDFLY_PASSWORD=bitnami", "WILDFLY_PUBLIC_CONSOLE=true", "WILDFLY_SERVER_AJP_PORT_NUMBER=8009", "WILDFLY_SERVER_HTTP_PORT_NUMBER=8080", "WILDFLY_SERVER_INTERFACE=0.0.0.0", "WILDFLY_USERNAME=user", "WILDFLY_WILDFLY_HOME=/home/wildfly", "WILDFLY_WILDFLY_OPTS=-Dwildfly.as.deployment.ondemand=false"], "ExposedPorts": {"8080/tcp": {}, "9990/tcp": {}}, "Labels": {"maintainer": "Bitnami <containers@bitnami.com>"}, "User": "1001"}, "Created": "2019-04-10T05:48:03.553887623Z", "Digest": "sha256:5a8ab28e314c2222de3feaf6dac94a0436a37fc08979d2722c99d2bef2619a9b", "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/142c1beadf1bb09fbd929465ec98c9dca3256638220450efb4214727d0d0680e/diff:/var/lib/containers/s", "MergedDir": "/var/lib/containers/storage/overlay/9aa10191f5bddb59e28508e721fdeb43505e5b395845fa99723ed787878dbfea/merged", "UpperDir": "/var/lib/containers/storage/overlay/9aa10191f5bddb59e28508e721fdeb43505e5b395845fa99723ed787878dbfea/diff", "WorkDir": "/var/lib/containers/storage/overlay/9aa10191f5bddb59e28508e721fdeb43505e5b395845fa99723ed787878dbfea/work"}, "Name": "overlay"}, "History": [{"comment": "from Bitnami with love", "created": "2019-04-09T22:27:40.659377677Z"}, {"created": "2019-04-09T22:38:53.86336555Z", "created_by": "/bin/sh -c #(nop)  LABEL maintainer=Bitnami <containers@bitnami.com>", "empty_layer": true}, {"created": "2019-04-09T22:38:54.022778765Z", "created_by": "/bin/sh -c #(nop)  ENV IMAGE_OS=debian-9", "empty_layer": true}], "Id": "ace34da54e4af2145e1ad277005adb235a214e4dfe1114c2db9ab460b840f785", "Labels": {"maintainer": "Bitnami <containers@bitnami.com>"}, "ManifestType": "application/vnd.docker.distribution.manifest.v1+prettyjws", "Os": "linux", "Parent": "", "RepoDigests": ["quay.io/bitnami/wildfly@sha256:5a8ab28e314c2222de3feaf6dac94a0436a37fc08979d2722c99d2bef2619a9b"], "RepoTags": ["quay.io/bitnami/wildfly:latest"], "RootFS": {"Layers": ["", "", "", "", "", "", "", "", "", "", "", ""], "Type": "layers"}, "Size": 466180019, "User": "1001", "Version": "18.09.3", "VirtualSize": 466180019}]

+
+

Authors

  • Sam Doran (@samdoran)

-
-
-
+ + + +
@@ -736,11 +550,48 @@

Navigation

+ + + @@ -770,8 +621,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_import – Import Podman container from a tar file. — Python documentation + + + + containers.podman.podman_import module – Import Podman container from a tar file. — Python documentation - - - + + + @@ -32,15 +33,19 @@
-
-

containers.podman.podman_import – Import Podman container from a tar file.

+
+

containers.podman.podman_import module – Import Podman container from a tar file.

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_import.

-
+
-
-

Synopsis

+ +
+

Synopsis

  • podman import imports a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) and saves it as a filesystem image.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- change - -
- list - / elements=dictionary
-
- -
Set changes as list of key-value pairs, see example.
-
-
- commit_message - -
- string -
-
- -
Set commit message for imported image
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- src - -
- string - / required
-
- -
Path to image file to load.
-
-
-
-

Examples

-
# What modules does for example
-- containers.podman.podman_import:
-    src: /path/to/tar/file
-    change:
-      - "CMD": /bin/bash
-      - "User": root
-    commit_message: "Importing image"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

change

+

list / elements=dictionary

+

Set changes as list of key-value pairs, see example.

+
+

commit_message

+

string

+

Set commit message for imported image

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

src

+

string / required

+

Path to image file to load.

+
+

volume

+

string

+

Volume to import, cannot be used with change and commit_message

+
+
+
+

Examples

+
# What modules does for example
+- containers.podman.podman_import:
+    src: /path/to/tar/file
+    change:
+      - "CMD": /bin/bash
+      - "User": root
+    commit_message: "Importing image"
+- containers.podman.podman_import:
+    src: /path/to/tar/file
+    volume: myvolume
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- image - -
- dictionary -
-
always -
info from loaded image
-
-
Sample:
-
{'Annotations': {}, 'Architecture': 'amd64', 'Author': '', 'Comment': 'imported from tarball', 'Config': {}, 'Created': '2021-09-07T04:45:38.749977105+03:00', 'Digest': 'sha256:8730c75be86a718929a658db4663d487e562d66762....', 'GraphDriver': {'Data': {'UpperDir': '/home/...34/diff', 'WorkDir': '/home/.../work'}, 'Name': 'overlay'}, 'History': [{'comment': 'imported from tarball', 'created': '2021-09-07T04:45:38.749977105+03:00', 'created_by': '/bin/sh -c #(nop) ADD file:091... in /'}], 'Id': 'cbc6d73c4d232db6e8441df96af81855f62c74157b5db80a1d5...', 'Labels': None, 'ManifestType': 'application/vnd.oci.image.manifest.v1+json', 'NamesHistory': None, 'Os': 'linux', 'Parent': '', 'RepoDigests': [], 'RepoTags': [], 'RootFS': {'Layers': ['sha256:....'], 'Type': 'layers'}, 'Size': 5882449, 'User': '', 'Version': '', 'VirtualSize': 5882449}
-
-

+ + + + + + + + + + + +

Key

Description

+

image

+

dictionary

+

info from loaded image

+

Returned: always

+

Sample: {"Annotations": {}, "Architecture": "amd64", "Author": "", "Comment": "imported from tarball", "Config": {}, "Created": "2021-09-07T04:45:38.749977105+03:00", "Digest": "sha256:8730c75be86a718929a658db4663d487e562d66762....", "GraphDriver": {"Data": {"UpperDir": "/home/...34/diff", "WorkDir": "/home/.../work"}, "Name": "overlay"}, "History": [{"comment": "imported from tarball", "created": "2021-09-07T04:45:38.749977105+03:00", "created_by": "/bin/sh -c #(nop) ADD file:091... in /"}], "Id": "cbc6d73c4d232db6e8441df96af81855f62c74157b5db80a1d5...", "Labels": null, "ManifestType": "application/vnd.oci.image.manifest.v1+json", "NamesHistory": null, "Os": "linux", "Parent": "", "RepoDigests": [], "RepoTags": [], "RootFS": {"Layers": ["sha256:...."], "Type": "layers"}, "Size": 5882449, "User": "", "Version": "", "VirtualSize": 5882449}

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -198,11 +184,48 @@

Navigation

+ + + @@ -232,8 +255,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_load – Load image from a tar file. — Python documentation + + + + containers.podman.podman_load module – Load image from a tar file. — Python documentation - - - + + + @@ -32,15 +33,19 @@
-
-

containers.podman.podman_load – Load image from a tar file.

+
+

containers.podman.podman_load module – Load image from a tar file.

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_load.

-
+
-
-

Synopsis

+ +
+

Synopsis

  • podman load loads an image from either an oci-archive or a docker-archive stored on the local machine into container storage. podman load is used for loading from the archive generated by podman save, that includes the image parent layers.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- input - -
- string - / required
-
- -
Path to image file to load.
-

aliases: path
-
-
-
-

Examples

-
# What modules does for example
-- containers.podman.podman_load:
-    input: /path/to/tar/file
+
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+
+

input

+

aliases: path

+

string / required

+

Path to image file to load.

+
+
+
+

Examples

+
# What modules does for example
+- containers.podman.podman_load:
+    input: /path/to/tar/file
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- image - -
- dictionary -
-
always -
info from loaded image
-
-
Sample:
-
[{'Annotations': {}, 'Architecture': 'amd64', 'Author': '', 'Comment': 'from Bitnami with love', 'ContainerConfig': {'Cmd': ['nami', 'start', '--foreground', 'wildfly'], 'Entrypoint': ['/app-entrypoint.sh'], 'Env': ['PATH=/opt/bitnami/java/bin:/opt/bitnami/wildfly/bin:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'IMAGE_OS=debian-9', 'NAMI_VERSION=0.0.9-0', 'GPG_KEY_SERVERS_LIST=ha.pool.sks-keyservers.net hkp://p80.pool.sks-keyservers.net:80 keyserver.ubuntu.com hkp://keyserver.ubuntu.com:80 pgp.mit.edu', 'TINI_VERSION=v0.13.2', 'TINI_GPG_KEY=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7', 'GOSU_VERSION=1.10', 'GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4', 'BITNAMI_IMAGE_VERSION=14.0.1-debian-9-r12', 'BITNAMI_APP_NAME=wildfly', 'WILDFLY_JAVA_HOME=', 'WILDFLY_JAVA_OPTS=', 'WILDFLY_MANAGEMENT_HTTP_PORT_NUMBER=9990', 'WILDFLY_PASSWORD=bitnami', 'WILDFLY_PUBLIC_CONSOLE=true', 'WILDFLY_SERVER_AJP_PORT_NUMBER=8009', 'WILDFLY_SERVER_HTTP_PORT_NUMBER=8080', 'WILDFLY_SERVER_INTERFACE=0.0.0.0', 'WILDFLY_USERNAME=user', 'WILDFLY_WILDFLY_HOME=/home/wildfly', 'WILDFLY_WILDFLY_OPTS=-Dwildfly.as.deployment.ondemand=false'], 'ExposedPorts': {'8080/tcp': {}, '9990/tcp': {}}, 'Labels': {'maintainer': 'Bitnami <containers@bitnami.com>'}}, 'Created': '2018-09-25T04:07:45.934395523Z', 'Digest': 'sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b', 'GraphDriver': {'Data': {'LowerDir': '/var/lib/containers/storage/overlay/a9dbf5616cc16919a8ac0dfc60aff87a72b5be52994c4649fcc91a089a12931f/diff:/var/lib/containers/storage/overlay/67129bd46022122a7d8b7acb490092af6c7ce244ce4fbd7d9e2d2b7f5979e090/diff:/var/lib/containers/storage/overlay/7c51242c4c5db5c74afda76d7fdbeab6965d8b21804bb3fc597dee09c770b0ca/diff:/var/lib/containers/storage/overlay/f97315dc58a9c002ba0cabccb9933d4b0d2113733d204188c88d72f75569b57b/diff:/var/lib/containers/storage/overlay/1dbde2dd497ddde2b467727125b900958a051a72561e58d29abe3d660dcaa9a7/diff:/var/lib/containers/storage/overlay/4aad9d80f30c3f0608f58173558b7554d84dee4dc4479672926eca29f75e6e33/diff:/var/lib/containers/storage/overlay/6751fc9b6868254870c062d75a511543fc8cfda2ce6262f4945f107449219632/diff:/var/lib/containers/storage/overlay/a27034d79081347421dd24d7e9e776c18271cd9a6e51053cb39af4d3d9c400e8/diff:/var/lib/containers/storage/overlay/537cf0045ed9cd7989f7944e7393019c81b16c1799a2198d8348cd182665397f/diff:/var/lib/containers/storage/overlay/27578615c5ae352af4e8449862d61aaf5c11b105a7d5905af55bd01b0c656d6e/diff:/var/lib/containers/storage/overlay/566542742840fe3034b3596f7cb9e62a6274c95a69f368f9e713746f8712c0b6/diff', 'MergedDir': '/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/merged', 'UpperDir': '/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/diff', 'WorkDir': '/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/work'}, 'Name': 'overlay'}, 'Id': 'bcacbdf7a119c0fa934661ca8af839e625ce6540d9ceb6827cdd389f823d49e0', 'Labels': {'maintainer': 'Bitnami <containers@bitnami.com>'}, 'ManifestType': 'application/vnd.docker.distribution.manifest.v1+prettyjws', 'Os': 'linux', 'Parent': '', 'RepoDigests': ['quay.io/bitnami/wildfly@sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b'], 'RepoTags': ['quay.io/bitnami/wildfly:latest'], 'RootFS': {'Layers': ['sha256:75391df2c87e076b0c2f72d20c95c57dc8be7ee684cc07273416cce622b43367', 'sha256:7dd303f041039bfe8f0833092673ac35f93137d10e0fbc4302021ea65ad57731', 'sha256:720d9edf0cd2a9bb56b88b80be9070dbfaad359514c70094c65066963fed485d', 'sha256:6a567ecbf97725501a634fcb486271999aa4591b633b4ae9932a46b40f5aaf47', 'sha256:59e9a6db8f178f3da868614564faabb2820cdfb69be32e63a4405d6f7772f68c', 'sha256:310a82ccb092cd650215ab375da8943d235a263af9a029b8ac26a281446c04db', 'sha256:36cb91cf4513543a8f0953fed785747ea18b675bc2677f3839889cfca0aac79e'], 'Type': 'layers'}, 'Size': 569919342, 'User': '', 'Version': '17.06.0-ce', 'VirtualSize': 569919342}]
-
-

+ + + + + + + + + + + +

Key

Description

+

image

+

dictionary

+

info from loaded image

+

Returned: always

+

Sample: [{"Annotations": {}, "Architecture": "amd64", "Author": "", "Comment": "from Bitnami with love", "ContainerConfig": {"Cmd": ["nami", "start", "--foreground", "wildfly"], "Entrypoint": ["/app-entrypoint.sh"], "Env": ["PATH=/opt/bitnami/java/bin:/opt/bitnami/wildfly/bin:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "IMAGE_OS=debian-9", "NAMI_VERSION=0.0.9-0", "GPG_KEY_SERVERS_LIST=ha.pool.sks-keyservers.net hkp://p80.pool.sks-keyservers.net:80 keyserver.ubuntu.com hkp://keyserver.ubuntu.com:80 pgp.mit.edu", "TINI_VERSION=v0.13.2", "TINI_GPG_KEY=595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7", "GOSU_VERSION=1.10", "GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4", "BITNAMI_IMAGE_VERSION=14.0.1-debian-9-r12", "BITNAMI_APP_NAME=wildfly", "WILDFLY_JAVA_HOME=", "WILDFLY_JAVA_OPTS=", "WILDFLY_MANAGEMENT_HTTP_PORT_NUMBER=9990", "WILDFLY_PASSWORD=bitnami", "WILDFLY_PUBLIC_CONSOLE=true", "WILDFLY_SERVER_AJP_PORT_NUMBER=8009", "WILDFLY_SERVER_HTTP_PORT_NUMBER=8080", "WILDFLY_SERVER_INTERFACE=0.0.0.0", "WILDFLY_USERNAME=user", "WILDFLY_WILDFLY_HOME=/home/wildfly", "WILDFLY_WILDFLY_OPTS=-Dwildfly.as.deployment.ondemand=false"], "ExposedPorts": {"8080/tcp": {}, "9990/tcp": {}}, "Labels": {"maintainer": "Bitnami <containers@bitnami.com>"}}, "Created": "2018-09-25T04:07:45.934395523Z", "Digest": "sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b", "GraphDriver": {"Data": {"LowerDir": "/var/lib/containers/storage/overlay/a9dbf5616cc16919a8ac0dfc60aff87a72b5be52994c4649fcc91a089a12931f/diff:/var/lib/containers/storage/overlay/67129bd46022122a7d8b7acb490092af6c7ce244ce4fbd7d9e2d2b7f5979e090/diff:/var/lib/containers/storage/overlay/7c51242c4c5db5c74afda76d7fdbeab6965d8b21804bb3fc597dee09c770b0ca/diff:/var/lib/containers/storage/overlay/f97315dc58a9c002ba0cabccb9933d4b0d2113733d204188c88d72f75569b57b/diff:/var/lib/containers/storage/overlay/1dbde2dd497ddde2b467727125b900958a051a72561e58d29abe3d660dcaa9a7/diff:/var/lib/containers/storage/overlay/4aad9d80f30c3f0608f58173558b7554d84dee4dc4479672926eca29f75e6e33/diff:/var/lib/containers/storage/overlay/6751fc9b6868254870c062d75a511543fc8cfda2ce6262f4945f107449219632/diff:/var/lib/containers/storage/overlay/a27034d79081347421dd24d7e9e776c18271cd9a6e51053cb39af4d3d9c400e8/diff:/var/lib/containers/storage/overlay/537cf0045ed9cd7989f7944e7393019c81b16c1799a2198d8348cd182665397f/diff:/var/lib/containers/storage/overlay/27578615c5ae352af4e8449862d61aaf5c11b105a7d5905af55bd01b0c656d6e/diff:/var/lib/containers/storage/overlay/566542742840fe3034b3596f7cb9e62a6274c95a69f368f9e713746f8712c0b6/diff", "MergedDir": "/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/merged", "UpperDir": "/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/diff", "WorkDir": "/var/lib/containers/storage/overlay/72bb96d6c53ad57a0b1e44cab226a6251598accbead40b23fac89c19ad8c25ca/work"}, "Name": "overlay"}, "Id": "bcacbdf7a119c0fa934661ca8af839e625ce6540d9ceb6827cdd389f823d49e0", "Labels": {"maintainer": "Bitnami <containers@bitnami.com>"}, "ManifestType": "application/vnd.docker.distribution.manifest.v1+prettyjws", "Os": "linux", "Parent": "", "RepoDigests": ["quay.io/bitnami/wildfly@sha256:5c7d8e2dd66dcf4a152a4032a1d3c5a33458c67e1c1335edd8d18d738892356b"], "RepoTags": ["quay.io/bitnami/wildfly:latest"], "RootFS": {"Layers": ["sha256:75391df2c87e076b0c2f72d20c95c57dc8be7ee684cc07273416cce622b43367", "sha256:7dd303f041039bfe8f0833092673ac35f93137d10e0fbc4302021ea65ad57731", "sha256:720d9edf0cd2a9bb56b88b80be9070dbfaad359514c70094c65066963fed485d", "sha256:6a567ecbf97725501a634fcb486271999aa4591b633b4ae9932a46b40f5aaf47", "sha256:59e9a6db8f178f3da868614564faabb2820cdfb69be32e63a4405d6f7772f68c", "sha256:310a82ccb092cd650215ab375da8943d235a263af9a029b8ac26a281446c04db", "sha256:36cb91cf4513543a8f0953fed785747ea18b675bc2677f3839889cfca0aac79e"], "Type": "layers"}, "Size": 569919342, "User": "", "Version": "17.06.0-ce", "VirtualSize": 569919342}]

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -165,11 +158,48 @@

Navigation

+ + + @@ -199,8 +229,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_login_info – Return the logged-in user if any for a given registry — Python documentation + + + + containers.podman.podman_login_info module – Return the logged-in user if any for a given registry — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_login_info – Return the logged-in user if any for a given registry

+
+

containers.podman.podman_login_info module – Return the logged-in user if any for a given registry

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_login_info.

-
-

New in version 1.0.0: of containers.podman

-
-
+

New in containers.podman 1.0.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Return the logged-in user if any for a given registry.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- authfile - -
- path -
-
- -
Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` (Not available for remote commands) You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- registry - -
- string - / required
-
- -
Registry server.
-
-
-
-

Examples

-
- name: Return the logged-in user for docker hub registry
-  containers.podman.podman_login_info:
-    registry: docker.io
-
-- name: Return the logged-in user for quay.io registry
-  containers.podman.podman_login_info:
-    registry: quay.io
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + +

Parameter

Comments

+

authfile

+

path

+

Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` (Not available for remote commands) You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

registry

+

string / required

+

Registry server.

+
+
+
+

Examples

+
- name: Return the logged-in user for docker hub registry
+  containers.podman.podman_login_info:
+    registry: docker.io
+
+- name: Return the logged-in user for quay.io registry
+  containers.podman.podman_login_info:
+    registry: quay.io
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- login - -
- dictionary -
-
always -
Logged in user for a registry
-
-
Sample:
-
{'logged_in': True, 'registry': 'docker.io', 'username': 'clelange'}
-
-

+ + + + + + + + + + + +

Key

Description

+

login

+

dictionary

+

Logged in user for a registry

+

Returned: always

+

Sample: {"logged_in": true, "registry": "docker.io", "username": "clelange"}

+
+

Authors

  • Clemens Lange (@clelange)

-
-
-
+ + + +
@@ -186,11 +168,48 @@

Navigation

+ + + @@ -220,8 +239,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_login – Login to a container registry using podman — Python documentation + + + + containers.podman.podman_login module – Login to a container registry using podman — Python documentation - - - + + + @@ -32,178 +33,137 @@
-
-

containers.podman.podman_login – Login to a container registry using podman

+
+

containers.podman.podman_login module – Login to a container registry using podman

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_login.

- -
-

Synopsis

+ +
+

Synopsis

    -
  • Login to a container registry server using the podman login command If the registry is not specified, the first registry under [registries.search] from registries.conf `will be used. The path of the authentication file can be overridden by the user by setting the `authfile flag. The default path used is ${XDG_RUNTIME_DIR}/containers/auth.json.

  • +
  • Login to a container registry server using the podman login command If the registry is not specified, the first registry under `[registries.search]` from `registries.conf `will be used. The path of the authentication file can be overridden by the user by setting the `authfile` flag. The default path used is `${XDG_RUNTIME_DIR}/containers/auth.json`.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- authfile - -
- path -
-
- -
Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``
-
-
- certdir - -
- path -
-
- -
Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. Default certificates directory is /etc/containers/certs.d.
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- password - -
- string - / required
-
- -
Password for the registry server.
-
-
- registry - -
- string -
-
- -
Registry server. If the registry is not specified, the first registry under `[registries.search]` from `registries.conf` will be used.
-
-
- tlsverify - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Require HTTPS and verify certificates when contacting registries. If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
-
-
- username - -
- string - / required
-
- -
Username for the registry server.
-
-
-
-

Examples

-
- name: Login to default registry and create ${XDG_RUNTIME_DIR}/containers/auth.json
-  containers.podman.podman_login:
-    username: user
-    password: 'p4ssw0rd'
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

authfile

+

path

+

Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``

+
+

certdir

+

path

+

Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. Default certificates directory is /etc/containers/certs.d.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

password

+

string / required

+

Password for the registry server.

+
+

registry

+

string

+

Registry server. If the registry is not specified, the first registry under `[registries.search]` from `registries.conf` will be used.

+
+

tlsverify

+

boolean

+

Require HTTPS and verify certificates when contacting registries. If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

username

+

string / required

+

Username for the registry server.

+
+
+
+

Examples

+
- name: Login to default registry and create ${XDG_RUNTIME_DIR}/containers/auth.json
+  containers.podman.podman_login:
+    username: user
+    password: 'p4ssw0rd'
 
-- name: Login to default registry and create ${XDG_RUNTIME_DIR}/containers/auth.json
-  containers.podman.podman_login:
-    username: user
-    password: 'p4ssw0rd'
-    registry: quay.io
+- name: Login to quay.io and create ${XDG_RUNTIME_DIR}/containers/auth.json
+  containers.podman.podman_login:
+    username: user
+    password: 'p4ssw0rd'
+    registry: quay.io
 
-
+

Authors

  • Jason Hiatt (@jthiatt)

  • Clemens Lange (@clelange)

  • +
  • Michael Fox (@spmfox)

-
-
-
+ + + +
@@ -222,11 +182,48 @@

Navigation

+ + + @@ -256,8 +253,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_logout – Log out of a container registry using podman — Python documentation + + + + containers.podman.podman_logout module – Log out of a container registry using podman — Python documentation - - - + + + @@ -32,156 +33,131 @@
-
-

containers.podman.podman_logout – Log out of a container registry using podman

+
+

containers.podman.podman_logout module – Log out of a container registry using podman

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_logout.

- -
-

Synopsis

+ +
+

Synopsis

    -
  • Log out of a container registry server using the podman logout command by deleting the cached credentials stored in the auth.json file. If the registry is not specified, the first registry under [registries.search] from registries.conf `will be used. The path of the authentication file can be overridden by the user by setting the `authfile flag. The default path used is ${XDG_RUNTIME_DIR}/containers/auth.json. All the cached credentials can be removed by setting the all flag. Warning - podman will use credentials in ${HOME}/.docker/config.json to authenticate in case they are not found in the default authfile. However, the logout command will only removed credentials in the authfile specified.

  • +
  • Log out of a container registry server using the podman logout command by deleting the cached credentials stored in the `auth.json` file. If the registry is not specified, the first registry under `[registries.search]` from `registries.conf `will be used. The path of the authentication file can be overridden by the user by setting the `authfile` flag. The default path used is `${XDG_RUNTIME_DIR}/containers/auth.json`. All the cached credentials can be removed by setting the `all` flag. Warning - podman will use credentials in `${HOME}/.docker/config.json` to authenticate in case they are not found in the default `authfile`. However, the logout command will only removed credentials in the `authfile` specified.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- all - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Remove the cached credentials for all registries in the auth file.
-
-
- authfile - -
- path -
-
- -
Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- ignore_docker_credentials - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Credentials created using other tools such as `docker login` are not removed unless the corresponding `authfile` is explicitly specified. Since podman also uses existing credentials in these files by default (for docker e.g. `${HOME}/.docker/config.json`), module execution will fail if a docker login exists for the registry specified in any `authfile` is used by podman. This can be ignored by setting `ignore_docker_credentials` to `yes` - the credentials will be kept and `changed` will be false. This option cannot be used together with `all` since in this case podman will not check for existing `authfiles` created by other tools.
-
-
- registry - -
- string -
-
- -
Registry server. If the registry is not specified, the first registry under `[registries.search]` from `registries.conf` will be used.
-
-
-
-

Examples

-
- name: Log out of default registry
-  podman_logout:
-
-- name: Log out of quay.io
-  podman_logout:
-    registry: quay.io
-
-- name: Log out of all registries in auth file
-  podman_logout:
-    all: yes
-
-- name: Log out of all registries in specified auth file
-  podman_logout:
-    authfile: $HOME/.docker/config.json
-    all: yes
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

all

+

boolean

+

Remove the cached credentials for all registries in the auth file.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

authfile

+

path

+

Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

ignore_docker_credentials

+

boolean

+

Credentials created using other tools such as `docker login` are not removed unless the corresponding `authfile` is explicitly specified. Since podman also uses existing credentials in these files by default (for docker e.g. `${HOME}/.docker/config.json`), module execution will fail if a docker login exists for the registry specified in any `authfile` is used by podman. This can be ignored by setting `ignore_docker_credentials` to `true` - the credentials will be kept and `changed` will be false. This option cannot be used together with `all` since in this case podman will not check for existing `authfiles` created by other tools.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

registry

+

string

+

Registry server. If the registry is not specified, the first registry under `[registries.search]` from `registries.conf` will be used.

+
+
+
+

Examples

+
- name: Log out of default registry
+  podman_logout:
+
+- name: Log out of quay.io
+  podman_logout:
+    registry: quay.io
+
+- name: Log out of all registries in auth file
+  podman_logout:
+    all: true
+
+- name: Log out of all registries in specified auth file
+  podman_logout:
+    authfile: $HOME/.docker/config.json
+    all: true
 
-
+

Authors

  • Clemens Lange (@clelange)

-
-
-
+ + + +
@@ -200,11 +176,48 @@

Navigation

+ + + @@ -234,8 +247,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_network_info – Gather info about podman networks — Python documentation + + + + containers.podman.podman_network_info module – Gather info about podman networks — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_network_info – Gather info about podman networks

+
+

containers.podman.podman_network_info module – Gather info about podman networks

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_network_info.

-
-

New in version 1.0.0: of containers.podman

-
-
+

New in containers.podman 1.0.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Gather info about podman networks with podman inspect command.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- name - -
- string -
-
- -
Name of the network
-
-
-
-

Examples

-
- name: Gather info about all present networks
-  containers.podman.podman_network_info:
-
-- name: Gather info about specific network
-  containers.podman.podman_network_info:
-    name: podman
+
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

name

+

string

+

Name of the network

+
+
+
+

Examples

+
- name: Gather info about all present networks
+  containers.podman.podman_network_info:
+
+- name: Gather info about specific network
+  containers.podman.podman_network_info:
+    name: podman
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- networks - -
- list - / elements=string
-
always -
Facts from all or specified networks
-
-
Sample:
-
[{'cniVersion': '0.4.0', 'name': 'podman', 'plugins': [{'bridge': 'cni-podman0', 'ipMasq': True, 'ipam': {'ranges': [[{'gateway': '10.88.0.1', 'subnet': '10.88.0.0/16'}]], 'routes': [{'dst': '0.0.0.0/0'}], 'type': 'host-local'}, 'isGateway': True, 'type': 'bridge'}, {'capabilities': {'portMappings': True}, 'type': 'portmap'}, {'backend': 'iptables', 'type': 'firewall'}]}]
-
-

+ + + + + + + + + + + +

Key

Description

+

networks

+

list / elements=string

+

Facts from all or specified networks

+

Returned: always

+

Sample: [{"cniVersion": "0.4.0", "name": "podman", "plugins": [{"bridge": "cni-podman0", "ipMasq": true, "ipam": {"ranges": [[{"gateway": "10.88.0.1", "subnet": "10.88.0.0/16"}]], "routes": [{"dst": "0.0.0.0/0"}], "type": "host-local"}, "isGateway": true, "type": "bridge"}, {"capabilities": {"portMappings": true}, "type": "portmap"}, {"backend": "iptables", "type": "firewall"}]}]

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -170,11 +160,48 @@

Navigation

+ + + @@ -204,8 +231,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_network – Manage podman networks — Python documentation + + + + containers.podman.podman_network module – Manage podman networks — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_network – Manage podman networks

+
+

containers.podman.podman_network module – Manage podman networks

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_network.

-
-

New in version 1.0.0: of containers.podman

-
-
+

New in containers.podman 1.0.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Manage podman networks with podman network command.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- debug - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return additional information which can be helpful for investigations.
-
-
- disable_dns - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
disable dns plugin (default "false")
-
-
- driver - -
- string -
-
- -
Driver to manage the network (default "bridge")
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- gateway - -
- string -
-
- -
IPv4 or IPv6 gateway for the subnet
-
-
- internal - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Restrict external access from this network (default "false")
-
-
- ip_range - -
- string -
-
- -
Allocate container IP from range
-
-
- ipv6 - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable IPv6 (Dual Stack) networking. You must pass a IPv6 subnet. The subnet option must be used with the ipv6 option.
-
-
- macvlan - -
- string -
-
- -
Create a Macvlan connection based on this device
-
-
- name - -
- string - / required
-
- -
Name of the network
-
-
- opt - -
- dictionary -
-
- -
Add network options. Currently 'vlan' and 'mtu' are supported.
-
-
- mtu - -
- integer -
-
- -
MTU size for bridge network interface.
-
-
- vlan - -
- integer -
-
- -
VLAN tag for bridge which enables vlan_filtering.
-
-
- recreate - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Recreate network even if exists.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
State of network, default 'present'
-
-
- subnet - -
- string -
-
- -
Subnet in CIDR format
-
-
-
-

Examples

-
- name: Create a podman network
-  containers.podman.podman_network:
-    name: podman_network
-  become: true
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

debug

+

boolean

+

Return additional information which can be helpful for investigations.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

disable_dns

+

boolean

+

disable dns plugin (default “false”)

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

driver

+

string

+

Driver to manage the network (default “bridge”)

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

force

+

boolean

+

Remove all containers that use the network. If the container is running, it is stopped and removed.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

gateway

+

string

+

IPv4 or IPv6 gateway for the subnet

+
+

interface_name

+

string

+

For bridge, it uses the bridge interface name. For macvlan, it is the parent device on the host (it is the same as ‘opt.parent’)

+
+

internal

+

boolean

+

Restrict external access from this network (default “false”)

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

ip_range

+

string

+

Allocate container IP from range

+
+

ipv6

+

boolean

+

Enable IPv6 (Dual Stack) networking. You must pass a IPv6 subnet. The subnet option must be used with the ipv6 option.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

macvlan

+

string

+

Create a Macvlan connection based on this device

+
+

name

+

string / required

+

Name of the network

+
+

opt

+

dictionary

+

Add network options. Currently ‘vlan’ and ‘mtu’ are supported.

+
+

isolate

+

boolean

+

This option isolates networks by blocking traffic between those that have this option enabled.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

metric

+

integer

+

Sets the Route Metric for the default route created in every container joined to this network. Can only be used with the Netavark network backend.

+
+

mode

+

string

+

This option sets the specified ip/macvlan mode on the interface.

+
+

mtu

+

integer

+

MTU size for bridge network interface.

+
+

parent

+

string

+

The host device which should be used for the macvlan interface (it is the same as ‘interface’ in that case). Defaults to the default route interface.

+
+

vlan

+

integer

+

VLAN tag for bridge which enables vlan_filtering.

+
+

recreate

+

boolean

+

Recreate network even if exists.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

state

+

string

+

State of network, default ‘present’

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+
+

subnet

+

string

+

Subnet in CIDR format

+
+
+
+

Examples

+
- name: Create a podman network
+  containers.podman.podman_network:
+    name: podman_network
+  become: true
 
-- name: Create internal podman network
-  containers.podman.podman_network:
-    name: podman_internal
-    internal: true
-    ip_range: 192.168.22.128/25
-    subnet: 192.168.22.0/24
-    gateway: 192.168.22.1
-  become: true
+- name: Create internal podman network
+  containers.podman.podman_network:
+    name: podman_internal
+    internal: true
+    ip_range: 192.168.22.128/25
+    subnet: 192.168.22.0/24
+    gateway: 192.168.22.1
+  become: true
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- network - -
- list - / elements=string
-
always -
Facts from created or updated networks
-
-
Sample:
-
[{'cniVersion': '0.4.0', 'name': 'podman', 'plugins': [{'bridge': 'cni-podman0', 'ipMasq': True, 'ipam': {'ranges': [[{'gateway': '10.88.0.1', 'subnet': '10.88.0.0/16'}]], 'routes': [{'dst': '0.0.0.0/0'}], 'type': 'host-local'}, 'isGateway': True, 'type': 'bridge'}, {'capabilities': {'portMappings': True}, 'type': 'portmap'}, {'backend': 'iptables', 'type': 'firewall'}]}]
-
-

+ + + + + + + + + + + +

Key

Description

+

network

+

list / elements=string

+

Facts from created or updated networks

+

Returned: always

+

Sample: [{"cniVersion": "0.4.0", "name": "podman", "plugins": [{"bridge": "cni-podman0", "ipMasq": true, "ipam": {"ranges": [[{"gateway": "10.88.0.1", "subnet": "10.88.0.0/16"}]], "routes": [{"dst": "0.0.0.0/0"}], "type": "host-local"}, "isGateway": true, "type": "bridge"}, {"capabilities": {"portMappings": true}, "type": "portmap"}, {"backend": "iptables", "type": "firewall"}]}]

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -414,11 +347,48 @@

Navigation

+ + + @@ -448,8 +418,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_play – Play kubernetes YAML file using podman — Python documentation + + + + containers.podman.podman_play module – Play kubernetes YAML file using podman — Python documentation - - - + + + @@ -32,331 +33,304 @@
-
-

containers.podman.podman_play – Play kubernetes YAML file using podman

+
+

containers.podman.podman_play module – Play kubernetes YAML file using podman

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_play.

- -
-

Synopsis

+ +
+

Synopsis

  • The module reads in a structured file of Kubernetes YAML. It will then recreate the pod and containers described in the YAML.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- authfile - -
- path -
-
- -
Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json, which is set using podman login. If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using docker login. Note - You can also override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. export REGISTRY_AUTH_FILE=path
-
-
- cert_dir - -
- path -
-
- -
Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. Default certificates directory is /etc/containers/certs.d. (This option is not available with the remote Podman client)
-
-
- configmap - -
- list - / elements=path
-
- -
Use Kubernetes configmap YAML at path to provide a source for environment variable values within the containers of the pod. Note - The configmap option can be used multiple times to pass multiple Kubernetes configmap YAMLs
-
-
- debug - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable debug for the module.
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Name of executable to run, by default 'podman'
-
-
- kube_file - -
- path - / required
-
- -
Path to file with YAML configuration for a Pod.
-
-
- log_driver - -
- string -
-
- -
Set logging driver for all created containers.
-
-
- log_level - -
- string -
-
-
    Choices: -
  • debug
  • -
  • info
  • -
  • warn
  • -
  • error
  • -
  • fatal
  • -
  • panic
  • -
-
-
Set logging level for podman calls. Log messages above specified level ("debug"|"info"|"warn"|"error"|"fatal"|"panic") (default "error")
-
-
- network - -
- list - / elements=string
-
- -
List of the names of CNI networks the pod should join.
-
-
- password - -
- string -
-
- -
The username and password to use to authenticate with the registry if required.
-
-
- quiet - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Hide image pulls logs from output.
-
-
- recreate - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If pod already exists, delete it and run the new one.
-
-
- seccomp_profile_root - -
- path -
-
- -
Directory path for seccomp profiles (default is "/var/lib/kubelet/seccomp"). This option is not available with the remote Podman client
-
-
- state - -
- string - / required
-
-
    Choices: -
  • created
  • -
  • started
  • -
  • absent
  • -
-
-
Start the pod after creating it, or to leave it created only.
-
-
- tls_verify - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Require HTTPS and verify certificates when contacting registries (default is true). If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
-
-
- username - -
- string -
-
- -
The username and password to use to authenticate with the registry if required.
-
-
-
-

Examples

-
- name: Play kube file
-  containers.podman.podman_play:
-    kube_file: ~/kube.yaml
-    state: started
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+
+

annotation

+

aliases: annotations

+

dictionary

+

Add an annotation to the container or pod.

+
+

authfile

+

path

+

Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json, which is set using podman login. If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using docker login. Note - You can also override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. export REGISTRY_AUTH_FILE=path

+
+

build

+

boolean

+

Build images even if they are found in the local storage.

+

It is required to exist subdirectories matching the image names to be build.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

cert_dir

+

path

+

Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. Default certificates directory is /etc/containers/certs.d. (This option is not available with the remote Podman client)

+
+

configmap

+

list / elements=path

+

Use Kubernetes configmap YAML at path to provide a source for environment variable values within the containers of the pod. Note - The configmap option can be used multiple times to pass multiple Kubernetes configmap YAMLs

+
+

context_dir

+

path

+

Use path as the build context directory for each image. Requires build option be true.

+
+

debug

+

boolean

+

Enable debug for the module.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

executable

+

string

+

Name of executable to run, by default ‘podman’

+

Default: "podman"

+
+

kube_file

+

path / required

+

Path to file with YAML configuration for a Pod.

+
+

log_driver

+

string

+

Set logging driver for all created containers.

+
+

log_level

+

string

+

Set logging level for podman calls. Log messages above specified level (“debug”|”info”|”warn”|”error”|”fatal”|”panic”) (default “error”)

+

Choices:

+
    +
  • "debug"

  • +
  • "info"

  • +
  • "warn"

  • +
  • "error"

  • +
  • "fatal"

  • +
  • "panic"

  • +
+
+
+

log_opt

+

aliases: log_options

+

dictionary

+

Logging driver specific options. Set custom logging configuration.

+
+
+

max_size

+

string

+

Specify a max size of the log file (e.g 10mb).

+
+
+

path

+

string

+

specify a path to the log file (e.g. /var/log/container/mycontainer.json).

+
+
+

tag

+

string

+

specify a custom log tag for the container. This option is currently supported only by the journald log driver in Podman.

+
+

network

+

list / elements=string

+

List of the names of CNI networks the pod should join.

+
+

password

+

string

+

The username and password to use to authenticate with the registry if required.

+
+

quiet

+

boolean

+

Hide image pulls logs from output.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

recreate

+

boolean

+

If pod already exists, delete it and run the new one.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

seccomp_profile_root

+

path

+

Directory path for seccomp profiles (default is “/var/lib/kubelet/seccomp”). This option is not available with the remote Podman client

+
+

state

+

string / required

+

Start the pod after creating it, or to leave it created only.

+

Choices:

+
    +
  • "created"

  • +
  • "started"

  • +
  • "absent"

  • +
+
+

tls_verify

+

boolean

+

Require HTTPS and verify certificates when contacting registries (default is true). If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

username

+

string

+

The username and password to use to authenticate with the registry if required.

+
+

userns

+

string

+

Set the user namespace mode for all the containers in a pod. It defaults to the PODMAN_USERNS environment variable. An empty value (“”) means user namespaces are disabled.

+
+
+
+

Examples

+
- name: Play kube file
+  containers.podman.podman_play:
+    kube_file: ~/kube.yaml
+    state: started
+
+- name: Recreate pod from a kube file with options
+  containers.podman.podman_play:
+    kube_file: ~/kube.yaml
+    state: started
+    recreate: true
+    annotations:
+      greeting: hello
+      greet_to: world
+    userns: host
+    log_opt:
+      path: /tmp/my-container.log
+      max_size: 10mb
 
-
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -375,11 +349,48 @@

Navigation

+ + + @@ -409,8 +420,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_pod_info – Gather info about podman pods — Python documentation + + + + containers.podman.podman_pod_info module – Gather info about podman pods — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_pod_info – Gather info about podman pods

+
+

containers.podman.podman_pod_info module – Gather info about podman pods

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_pod_info.

-
-

New in version 1.0.0: of containers.podman

-
-
+

New in containers.podman 1.0.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Gather info about podman pods with podman inspect command.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- name - -
- string -
-
- -
Name of the pod
-
-
-
-

Examples

-
- name: Gather info about all present pods
-  containers.podman.podman_pod_info:
-
-- name: Gather info about specific pods
-  containers.podman.podman_pod_info:
-    name: special_pod
+
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

name

+

string

+

Name of the pod

+
+
+
+

Examples

+
- name: Gather info about all present pods
+  containers.podman.podman_pod_info:
+
+- name: Gather info about specific pods
+  containers.podman.podman_pod_info:
+    name: special_pod
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- pods - -
- list - / elements=string
-
always -
Facts from all or specified pods
-
-
Sample:
-
[{'Config': {'cgroupParent': '/libpod_parent', 'created': '2020-07-13T20:29:12.572282186+03:00', 'hostname': 'pod1host', 'id': 'd9cb6dbb0....', 'infraConfig': {'infraPortBindings': [{'containerPort': 7111, 'hostIP': '', 'hostPort': 7777, 'protocol': 'tcp'}], 'makeInfraContainer': True}, 'labels': {}, 'lockID': 682, 'name': 'pod1', 'sharesCgroup': True, 'sharesIpc': True, 'sharesNet': True, 'sharesUts': True}, 'Containers': [{'id': 'ad46737bf....', 'state': 'configured'}], 'State': {'cgroupPath': '/libpod_parent/d9cb6dbb0....', 'infraContainerID': 'ad46737bf....', 'status': 'Created'}}]
-
-

+ + + + + + + + + + + +

Key

Description

+

pods

+

list / elements=string

+

Facts from all or specified pods

+

Returned: always

+

Sample: [{"Config": {"cgroupParent": "/libpod_parent", "created": "2020-07-13T20:29:12.572282186+03:00", "hostname": "pod1host", "id": "d9cb6dbb0....", "infraConfig": {"infraPortBindings": [{"containerPort": 7111, "hostIP": "", "hostPort": 7777, "protocol": "tcp"}], "makeInfraContainer": true}, "labels": {}, "lockID": 682, "name": "pod1", "sharesCgroup": true, "sharesIpc": true, "sharesNet": true, "sharesUts": true}, "Containers": [{"id": "ad46737bf....", "state": "configured"}], "State": {"cgroupPath": "/libpod_parent/d9cb6dbb0....", "infraContainerID": "ad46737bf....", "status": "Created"}}]

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -170,11 +160,48 @@

Navigation

+ + + @@ -204,8 +231,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_pod – Manage Podman pods — Python documentation + + + + containers.podman.podman_pod module – Manage Podman pods — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_pod – Manage Podman pods

+
+

containers.podman.podman_pod module – Manage Podman pods

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_pod.

-
-

New in version 1.0.0: of containers.podman

-
-
+

New in containers.podman 1.0.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Manage podman pods.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- add_host - -
- list - / elements=string
-
- -
Add a host to the /etc/hosts file shared between all containers in the pod.
-
-
- cgroup_parent - -
- string -
-
- -
Path to cgroups under which the cgroup for the pod will be created. If the path is not absolute, he path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
-
-
- cpus - -
- string -
-
- -
Set the total number of CPUs delegated to the pod. Default is 0.000 which indicates that there is no limit on computation power.
-
-
- cpuset_cpus - -
- string -
-
- -
Limit the CPUs to support execution. First CPU is numbered 0. Unlike `cpus` this is of type string and parsed as a list of numbers. Format is 0-3,0,1
-
-
- debug - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return additional information which can be helpful for investigations.
-
-
- device - -
- list - / elements=string
-
- -
Add a host device to the pod. Optional permissions parameter can be used to specify device permissions. It is a combination of r for read, w for write, and m for mknod(2)
-
-
- device_read_bps - -
- list - / elements=string
-
- -
Limit read rate (bytes per second) from a device (e.g. device-read-bps=/dev/sda:1mb)
-
-
- dns - -
- list - / elements=string
-
- -
Set custom DNS servers in the /etc/resolv.conf file that will be shared between all containers in the pod. A special option, "none" is allowed which disables creation of /etc/resolv.conf for the pod.
-
-
- dns_opt - -
- list - / elements=string
-
- -
Set custom DNS options in the /etc/resolv.conf file that will be shared between all containers in the pod.
-
- - dns_search - -
- list - / elements=string
-
- -
Set custom DNS search domains in the /etc/resolv.conf file that will be shared between all containers in the pod.
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- generate_systemd - -
- dictionary -
-
- Default:
{}
-
-
Generate systemd unit file for container.
-
-
- after - -
- list - / elements=string
-
- -
Add the systemd unit after (After=) option, that ordering dependencies between the list of dependencies and this service.
-
-
- container_prefix - -
- string -
-
- -
Set the systemd unit name prefix for containers. The default is "container".
-
-
- names - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Use names of the containers for the start, stop, and description in the unit file. Default is true.
-
-
- new - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Create containers and pods when the unit is started instead of expecting them to exist. The default is "false". Refer to podman-generate-systemd(1) for more information.
-
-
- no_header - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Do not generate the header including meta data such as the Podman version and the timestamp. From podman version 3.1.0.
-
-
- path - -
- string -
-
- -
Specify a path to the directory where unit files will be generated. Required for this option. If it doesn't exist, the directory will be created.
-
-
- pod_prefix - -
- string -
-
- -
Set the systemd unit name prefix for pods. The default is "pod".
-
-
- requires - -
- list - / elements=string
-
- -
Set the systemd unit requires (Requires=) option. Similar to wants, but declares a stronger requirement dependency.
-
-
- restart_policy - -
- string -
-
-
    Choices: -
  • no
  • -
  • on-success
  • -
  • on-failure
  • -
  • on-abnormal
  • -
  • on-watchdog
  • -
  • on-abort
  • -
  • always
  • -
-
-
Specify a restart policy for the service. The restart-policy must be one of "no", "on-success", "on-failure", "on-abnormal", "on-watchdog", "on-abort", or "always". The default policy is "on-failure".
-
-
- separator - -
- string -
-
- -
Set the systemd unit name separator between the name/id of a container/pod and the prefix. The default is "-" (dash).
-
-
- time - -
- integer -
-
- -
Override the default stop timeout for the container with the given value.
-
-
- wants - -
- list - / elements=string
-
- -
Add the systemd unit wants (Wants=) option, that this service is (weak) dependent on.
-
-
- gidmap - -
- list - / elements=string
-
- -
GID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `userns` and `subgidname` flags.
-
-
- hostname - -
- string -
-
- -
Set a hostname to the pod
-
-
- infra - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Create an infra container and associate it with the pod. An infra container is a lightweight container used to coordinate the shared kernel namespace of a pod. Default is true.
-
-
- infra_command - -
- string -
-
- -
The command that will be run to start the infra container. Default is "/pause".
-
-
- infra_conmon_pidfile - -
- string -
-
- -
Write the pid of the infra container's conmon process to a file. As conmon runs in a separate process than Podman, this is necessary when using systemd to manage Podman containers and pods.
-
-
- infra_image - -
- string -
-
- -
The image that will be created for the infra container. Default is "k8s.gcr.io/pause:3.1".
-
-
- infra_name - -
- string -
-
- -
The name that will be used for the pod's infra container.
-
-
- ip - -
- string -
-
- -
Set a static IP for the pod's shared network.
-
-
- label - -
- dictionary -
-
- -
Add metadata to a pod, pass dictionary of label keys and values.
-
-
- label_file - -
- string -
-
- -
Read in a line delimited file of labels.
-
-
- mac_address - -
- string -
-
- -
Set a static MAC address for the pod's shared network.
-
-
- name - -
- string - / required
-
- -
Assign a name to the pod.
-
-
- network - -
- list - / elements=string
-
- -
Set network mode for the pod. Supported values are bridge (the default), host (do not create a network namespace, all containers in the pod will use the host's network), or a list of names of CNI networks to join.
-
-
- network_alias - -
- list - / elements=string
-
- -
Add a network-scoped alias for the pod, setting the alias for all networks that the pod joins. To set a name only for a specific network, use the alias option as described under the -`network` option. Network aliases work only with the bridge networking mode. This option can be specified multiple times.
-

aliases: network_aliases
-
-
- no_hosts - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable creation of /etc/hosts for the pod.
-
-
- pid - -
- string -
-
- -
Set the PID mode for the pod. The default is to create a private PID namespace for the pod. Requires the PID namespace to be shared via `share` option.
-
-
- pod_id_file - -
- string -
-
- -
Write the pod ID to the file.
-
-
- publish - -
- list - / elements=string
-
- -
Publish a port or range of ports from the pod to the host.
-

aliases: ports
-
-
- recreate - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use with present and started states to force the re-creation of an existing pod.
-
-
- share - -
- string -
-
- -
A comma delimited list of kernel namespaces to share. If none or "" is specified, no namespaces will be shared. The namespaces to choose from are ipc, net, pid, user, uts.
-
-
- state - -
- string -
-
-
    Choices: -
  • created ←
  • -
  • killed
  • -
  • restarted
  • -
  • absent
  • -
  • started
  • -
  • stopped
  • -
  • paused
  • -
  • unpaused
  • -
-
-
This variable is set for state
-
-
- subgidname - -
- string -
-
- -
Name for GID map from the /etc/subgid file. Using this flag will run the container with user namespace enabled. This flag conflicts with `userns` and `gidmap`.
-
-
- subuidname - -
- string -
-
- -
Name for UID map from the /etc/subuid file. Using this flag will run the container with user namespace enabled. This flag conflicts with `userns` and `uidmap`.
-
-
- uidmap - -
- list - / elements=string
-
- -
Run the container in a new user namespace using the supplied mapping. This option conflicts with the `userns` and `subuidname` options. This option provides a way to map host UIDs to container UIDs. It can be passed several times to map different ranges.
-
-
- userns - -
- string -
-
- -
Set the user namespace mode for all the containers in a pod. It defaults to the PODMAN_USERNS environment variable. An empty value ("") means user namespaces are disabled.
-
-
- volume - -
- list - / elements=string
-
- -
Create a bind mount.
-

aliases: volumes
-
-
-
-

Examples

-
# What modules does for example
-- podman_pod:
-    name: pod1
-    state: started
-    ports:
-      - "4444:5555"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

add_host

+

list / elements=string

+

Add a host to the /etc/hosts file shared between all containers in the pod.

+
+

blkio_weight

+

string

+

Block IO relative weight. The weight is a value between 10 and 1000.

+

This option is not supported on cgroups V1 rootless systems.

+
+

blkio_weight_device

+

list / elements=string

+

Block IO relative device weight.

+
+

cgroup_parent

+

string

+

Path to cgroups under which the cgroup for the pod will be created. If the path is not absolute, he path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.

+
+

cpu_shares

+

string

+

CPU shares (relative weight).

+
+

cpus

+

string

+

Set the total number of CPUs delegated to the pod. Default is 0.000 which indicates that there is no limit on computation power.

+
+

cpuset_cpus

+

string

+

Limit the CPUs to support execution. First CPU is numbered 0. Unlike `cpus` this is of type string and parsed as a list of numbers. Format is 0-3,0,1

+
+

cpuset_mems

+

string

+

Memory nodes in which to allow execution (0-3, 0,1). Only effective on NUMA systems.

+
+

debug

+

boolean

+

Return additional information which can be helpful for investigations.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

device

+

list / elements=string

+

Add a host device to the pod. Optional permissions parameter can be used to specify device permissions. It is a combination of r for read, w for write, and m for mknod(2)

+
+

device_read_bps

+

list / elements=string

+

Limit read rate (bytes per second) from a device (e.g. device-read-bps=/dev/sda:1mb)

+
+

device_write_bps

+

list / elements=string

+

Limit write rate (in bytes per second) to a device.

+
+

dns

+

list / elements=string

+

Set custom DNS servers in the /etc/resolv.conf file that will be shared between all containers in the pod. A special option, “none” is allowed which disables creation of /etc/resolv.conf for the pod.

+
+

dns_opt

+

list / elements=string

+

Set custom DNS options in the /etc/resolv.conf file that will be shared between all containers in the pod.

+
+ +

list / elements=string

+

Set custom DNS search domains in the /etc/resolv.conf file that will be shared between all containers in the pod.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

generate_systemd

+

dictionary

+

Generate systemd unit file for container.

+

Default: {}

+
+

after

+

list / elements=string

+

Add the systemd unit after (After=) option, that ordering dependencies between the list of dependencies and this service.

+
+

container_prefix

+

string

+

Set the systemd unit name prefix for containers. The default is “container”.

+
+

names

+

boolean

+

Use names of the containers for the start, stop, and description in the unit file. Default is true.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

new

+

boolean

+

Create containers and pods when the unit is started instead of expecting them to exist. The default is “false”. Refer to podman-generate-systemd(1) for more information.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

no_header

+

boolean

+

Do not generate the header including meta data such as the Podman version and the timestamp. From podman version 3.1.0.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

path

+

string

+

Specify a path to the directory where unit files will be generated. Required for this option. If it doesn’t exist, the directory will be created.

+
+

pod_prefix

+

string

+

Set the systemd unit name prefix for pods. The default is “pod”.

+
+

requires

+

list / elements=string

+

Set the systemd unit requires (Requires=) option. Similar to wants, but declares a stronger requirement dependency.

+
+

restart_policy

+

string

+

Specify a restart policy for the service. The restart-policy must be one of “no”, “on-success”, “on-failure”, “on-abnormal”, “on-watchdog”, “on-abort”, or “always”. The default policy is “on-failure”.

+

Choices:

+
    +
  • "no"

  • +
  • "on-success"

  • +
  • "on-failure"

  • +
  • "on-abnormal"

  • +
  • "on-watchdog"

  • +
  • "on-abort"

  • +
  • "always"

  • +
+
+

restart_sec

+

integer

+

Set the systemd service restartsec value.

+
+

separator

+

string

+

Set the systemd unit name separator between the name/id of a container/pod and the prefix. The default is “-” (dash).

+
+

start_timeout

+

integer

+

Override the default start timeout for the container with the given value.

+
+
+

stop_timeout

+

aliases: time

+

integer

+

Override the default stop timeout for the container with the given value. Called `time` before version 4.

+
+

wants

+

list / elements=string

+

Add the systemd unit wants (Wants=) option, that this service is (weak) dependent on.

+
+

gidmap

+

list / elements=string

+

GID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `userns` and `subgidname` flags.

+
+

hostname

+

string

+

Set a hostname to the pod

+
+

infra

+

boolean

+

Create an infra container and associate it with the pod. An infra container is a lightweight container used to coordinate the shared kernel namespace of a pod. Default is true.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

infra_command

+

string

+

The command that will be run to start the infra container. Default is “/pause”.

+
+

infra_conmon_pidfile

+

string

+

Write the pid of the infra container’s conmon process to a file. As conmon runs in a separate process than Podman, this is necessary when using systemd to manage Podman containers and pods.

+
+

infra_image

+

string

+

The image that will be created for the infra container. Default is “k8s.gcr.io/pause:3.1”.

+
+

infra_name

+

string

+

The name that will be used for the pod’s infra container.

+
+

ip

+

string

+

Set a static IP for the pod’s shared network.

+
+

label

+

dictionary

+

Add metadata to a pod, pass dictionary of label keys and values.

+
+

label_file

+

string

+

Read in a line delimited file of labels.

+
+

mac_address

+

string

+

Set a static MAC address for the pod’s shared network.

+
+

memory

+

string

+

Set memory limit.

+

A unit can be b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes).

+
+

memory_swap

+

string

+

Set limit value equal to memory plus swap.

+

A unit can be b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes).

+
+

name

+

string / required

+

Assign a name to the pod.

+
+

network

+

list / elements=string

+

Set network mode for the pod. Supported values are bridge (the default), host (do not create a network namespace, all containers in the pod will use the host’s network), or a list of names of CNI networks to join.

+
+
+

network_alias

+

aliases: network_aliases

+

list / elements=string

+

Add a network-scoped alias for the pod, setting the alias for all networks that the pod joins. To set a name only for a specific network, use the alias option as described under the -`network` option. Network aliases work only with the bridge networking mode. This option can be specified multiple times.

+
+

no_hosts

+

boolean

+

Disable creation of /etc/hosts for the pod.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+

pid

+

string

+

Set the PID mode for the pod. The default is to create a private PID namespace for the pod. Requires the PID namespace to be shared via `share` option.

+
+

pod_id_file

+

string

+

Write the pod ID to the file.

+
+
+

publish

+

aliases: ports

+

list / elements=string

+

Publish a port or range of ports from the pod to the host.

+
+

recreate

+

boolean

+

Use with present and started states to force the re-creation of an existing pod.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

share

+

string

+

A comma delimited list of kernel namespaces to share. If none or “” is specified, no namespaces will be shared. The namespaces to choose from are ipc, net, pid, user, uts.

+
+

state

+

string

+

This variable is set for state

+

Choices:

+
    +
  • "created" ← (default)

  • +
  • "killed"

  • +
  • "restarted"

  • +
  • "absent"

  • +
  • "started"

  • +
  • "stopped"

  • +
  • "paused"

  • +
  • "unpaused"

  • +
+
+

subgidname

+

string

+

Name for GID map from the /etc/subgid file. Using this flag will run the container with user namespace enabled. This flag conflicts with `userns` and `gidmap`.

+
+

subuidname

+

string

+

Name for UID map from the /etc/subuid file. Using this flag will run the container with user namespace enabled. This flag conflicts with `userns` and `uidmap`.

+
+

uidmap

+

list / elements=string

+

Run the container in a new user namespace using the supplied mapping. This option conflicts with the `userns` and `subuidname` options. This option provides a way to map host UIDs to container UIDs. It can be passed several times to map different ranges.

+
+

userns

+

string

+

Set the user namespace mode for all the containers in a pod. It defaults to the PODMAN_USERNS environment variable. An empty value (“”) means user namespaces are disabled.

+
+
+

volume

+

aliases: volumes

+

list / elements=string

+

Create a bind mount.

+
+
+
+

Examples

+
# What modules does for example
+- podman_pod:
+    name: pod1
+    state: started
+    ports:
+      - "4444:5555"
 
-# Connect random port from localhost to port 80 on pod2
-- name: Connect random port from localhost to port 80 on pod2
-  containers.podman.podman_pod:
-    name: pod2
-    state: started
-    publish: "127.0.0.1::80"
+# Connect random port from localhost to port 80 on pod2
+- name: Connect random port from localhost to port 80 on pod2
+  containers.podman.podman_pod:
+    name: pod2
+    state: started
+    publish: "127.0.0.1::80"
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- pod - -
- dictionary -
-
always -
Pod inspection results for the given pod built.
-
-
Sample:
-
{'Config': {'cgroupParent': '/libpod_parent', 'created': '2020-06-14T15:16:12.230818767+03:00', 'hostname': 'newpod', 'id': 'a5a5c6cdf8c72272fc5c33f787e8d7501e2fa0c1e92b2b602860defdafeeec58', 'infraConfig': {'infraPortBindings': None, 'makeInfraContainer': True}, 'labels': {}, 'lockID': 515, 'name': 'newpod', 'sharesCgroup': True, 'sharesIpc': True, 'sharesNet': True, 'sharesUts': True}, 'Containers': [{'id': 'dc70a947c7ae15198ec38b3c817587584085dee3919cbeb9969e3ab77ba10fd2', 'state': 'configured'}], 'State': {'cgroupPath': '/libpod_parent/a5a5c6cdf8c72272fc5c33f787e8d7501e2fa0c1e92b2b602860defdafeeec58', 'infraContainerID': 'dc70a947c7ae15198ec38b3c817587584085dee3919cbeb9969e3ab77ba10fd2', 'status': 'Created'}}
-
-

+ + + + + + + + + + + +

Key

Description

+

pod

+

dictionary

+

Pod inspection results for the given pod built.

+

Returned: always

+

Sample: {"Config": {"cgroupParent": "/libpod_parent", "created": "2020-06-14T15:16:12.230818767+03:00", "hostname": "newpod", "id": "a5a5c6cdf8c72272fc5c33f787e8d7501e2fa0c1e92b2b602860defdafeeec58", "infraConfig": {"infraPortBindings": null, "makeInfraContainer": true}, "labels": {}, "lockID": 515, "name": "newpod", "sharesCgroup": true, "sharesIpc": true, "sharesNet": true, "sharesUts": true}, "Containers": [{"id": "dc70a947c7ae15198ec38b3c817587584085dee3919cbeb9969e3ab77ba10fd2", "state": "configured"}], "State": {"cgroupPath": "/libpod_parent/a5a5c6cdf8c72272fc5c33f787e8d7501e2fa0c1e92b2b602860defdafeeec58", "infraContainerID": "dc70a947c7ae15198ec38b3c817587584085dee3919cbeb9969e3ab77ba10fd2", "status": "Created"}}

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -961,11 +634,48 @@

Navigation

+ + + @@ -995,8 +705,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | + + + + + + + + containers.podman.podman_prune module – Allows to prune various podman objects — Python documentation + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

containers.podman.podman_prune module – Allows to prune various podman objects

+
+

Note

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

+

To use it in a playbook, specify: containers.podman.podman_prune.

+
+

New in containers.podman 1.10.0

+ +
+

Synopsis

+
    +
  • Allows to run podman container prune, podman image prune, podman network prune, podman volume prune and podman system prune

  • +
+
+
+

Requirements

+

The below requirements are needed on the host that executes this module.

+
    +
  • Podman installed on host

  • +
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

container

+

boolean

+

Whether to prune containers.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

container_filters

+

dictionary

+

A dictionary of filter values used for selecting containers to delete.

+

For example, until: 24h.

+

See the podman documentation for more information on possible filters.

+
+

executable

+

string

+

Podman binary.

+

Default: "podman"

+
+

image

+

boolean

+

Whether to prune images.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

image_filters

+

dictionary

+

A dictionary of filter values used for selecting images to delete.

+

You can also use dangling_only: false to delete dangling and non-dangling images or external: true to delete images even when they are used by external containers.

+

See the podman documentation for more information on possible filters.

+
+

network

+

boolean

+

Whether to prune networks.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

network_filters

+

dictionary

+

A dictionary of filter values used for selecting networks to delete.

+

See the podman documentation for more information on possible filters.

+
+

system

+

boolean

+

Whether to prune unused pods, containers, image, networks and volume data

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

system_all

+

boolean

+

Whether to prune all unused images, not only dangling images.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

system_volumes

+

boolean

+

Whether to prune volumes currently unused by any container.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

volume

+

boolean

+

Whether to prune volumes.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

volume_filters

+

dictionary

+

A dictionary of filter values used for selecting volumes to delete.

+

See the podman documentation for more information on possible filters.

+
+
+
+

Examples

+
- name: Prune containers older than 24h
+  containers.podman.podman_prune:
+      containers: true
+      containers_filters:
+          # only consider containers created more than 24 hours ago
+          until: 24h
+
+- name: Prune everything
+  containers.podman.podman_prune:
+      system: true
+
+- name: Prune everything (including non-dangling images)
+  containers.podman.podman_prune:
+      system: true
+      system_all: true
+      system_volumes: true
+
+
+
+
+

Return Values

+

Common return values are documented here, the following are the fields unique to this module:

+ + + + + + + + + + + + + + + + + + + + + + + +

Key

Description

+

containers

+

list / elements=string

+

List of IDs of deleted containers.

+

Returned: containers is true

+

Sample: []

+
+

images

+

list / elements=string

+

List of IDs of deleted images.

+

Returned: images is true

+

Sample: []

+
+

networks

+

list / elements=string

+

List of IDs of deleted networks.

+

Returned: networks is true

+

Sample: []

+
+

system

+

list / elements=string

+

List of ID of deleted containers, volumes, images, network and total reclaimed space

+

Returned: system is true

+

Sample: []

+
+

volumes

+

list / elements=string

+

List of IDs of deleted volumes.

+

Returned: volumes is true

+

Sample: []

+
+
+

Authors

+
    +
  • Roberto Alfieri (@rebtoor)

  • +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/podman_runlabel_module.html b/ansible_collections/containers/podman/docs/podman_runlabel_module.html new file mode 100644 index 000000000..133d14adf --- /dev/null +++ b/ansible_collections/containers/podman/docs/podman_runlabel_module.html @@ -0,0 +1,227 @@ + + + + + + + + + containers.podman.podman_runlabel module – Run given label from given image — Python documentation + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

containers.podman.podman_runlabel module – Run given label from given image

+
+

Note

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

+

To use it in a playbook, specify: containers.podman.podman_runlabel.

+
+ +
+

Synopsis

+
    +
  • podman container runlabel runs selected label from given image

  • +
+
+
+

Requirements

+

The below requirements are needed on the host that executes this module.

+
    +
  • Podman installed on host

  • +
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

image

+

string / required

+

Image to get the label from.

+
+

label

+

string / required

+

Label to run.

+
+
+
+

Examples

+
# What modules does for example
+- containers.podman.podman_runlabel:
+    image: docker.io/continuumio/miniconda3
+    label: INSTALL
+
+
+
+

Authors

+
    +
  • Pavel Dostal (@pdostal)

  • +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/podman_save_module.html b/ansible_collections/containers/podman/docs/podman_save_module.html index cb7002f3c..7a58a96b0 100644 --- a/ansible_collections/containers/podman/docs/podman_save_module.html +++ b/ansible_collections/containers/podman/docs/podman_save_module.html @@ -1,21 +1,22 @@ - - - containers.podman.podman_save – Saves podman image to tar file — Python documentation + + + + containers.podman.podman_save module – Saves podman image to tar file — Python documentation - - - + + + @@ -32,187 +33,154 @@
-
-

containers.podman.podman_save – Saves podman image to tar file

+
+

containers.podman.podman_save module – Saves podman image to tar file

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_save.

- -
-

Synopsis

+ +
+

Synopsis

  • podman save saves an image to either docker-archive, oci-archive, oci-dir (directory with oci manifest type), or docker-dir (directory with v2s2 manifest type) on the local machine, default is docker-archive.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- compress - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
-
-
- dest - -
- string - / required
-
- -
Destination file to write image to.
-

aliases: path
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Force saving to file even if it exists.
-
-
- format - -
- string -
-
-
    Choices: -
  • docker-archive
  • -
  • oci-archive
  • -
  • oci-dir
  • -
  • docker-dir
  • -
-
-
Save image to docker-archive, oci-archive (see containers-transports(5)), oci-dir (oci transport), or docker-dir (dir transport with v2s2 manifest type).
-
-
- image - -
- string - / required
-
- -
Image to save.
-
-
- multi_image_archive - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Allow for creating archives with more than one image. Additional names will be interpreted as images instead of tags. Only supported for docker-archive.
-
-
-
-

Examples

-
# What modules does for example
-- containers.podman.podman_save:
-    dest: /path/to/tar/file
-    compress: true
-    format: oci-dir
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

compress

+

boolean

+

Compress tarball image layers when pushing to a directory using the ‘dir’ transport. (default is same compression type, compressed or uncompressed, as source)

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+
+

dest

+

aliases: path

+

string / required

+

Destination file to write image to.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

force

+

boolean

+

Force saving to file even if it exists.

+

Choices:

+
    +
  • false

  • +
  • true ← (default)

  • +
+
+

format

+

string

+

Save image to docker-archive, oci-archive (see containers-transports(5)), oci-dir (oci transport), or docker-dir (dir transport with v2s2 manifest type).

+

Choices:

+
    +
  • "docker-archive"

  • +
  • "oci-archive"

  • +
  • "oci-dir"

  • +
  • "docker-dir"

  • +
+
+

image

+

list / elements=string / required

+

Image to save.

+
+

multi_image_archive

+

boolean

+

Allow for creating archives with more than one image. Additional names will be interpreted as images instead of tags. Only supported for docker-archive.

+

Choices:

+
    +
  • false

  • +
  • true

  • +
+
+
+
+

Examples

+
# What modules does for example
+- containers.podman.podman_save:
+    image: nginx
+    dest: /tmp/file123.tar
+- containers.podman.podman_save:
+    image:
+      - nginx
+      - fedora
+    dest: /tmp/file456.tar
+    multi_image_archive: true
 
-
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -231,11 +199,48 @@

Navigation

+ + + @@ -265,8 +270,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | + + + + + + + + containers.podman.podman_secret_info module – Gather info about podman secrets — Python documentation + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

containers.podman.podman_secret_info module – Gather info about podman secrets

+
+

Note

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

+

To use it in a playbook, specify: containers.podman.podman_secret_info.

+
+ +
+

Synopsis

+
    +
  • Gather info about podman secrets with podman inspect command.

  • +
+
+
+

Requirements

+

The below requirements are needed on the host that executes this module.

+
    +
  • Podman installed on host

  • +
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

name

+

string

+

Name of the secret

+
+

showsecret

+

boolean

+

Show secret data value

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+
+
+

Examples

+
- name: Gather info about all present secrets
+  podman_secret_info:
+
+- name: Gather info about specific secret
+  podman_secret_info:
+    name: specific_secret
+
+
+
+
+

Return Values

+

Common return values are documented here, the following are the fields unique to this module:

+ + + + + + + + + + + +

Key

Description

+

secrets

+

list / elements=string

+

Facts from all or specified secrets

+

Returned: always

+

Sample: [{"CreatedAt": "2024-01-28T20:32:08.31857841+02:00", "ID": "06068c676e9a7f1c7dc0da8dd", "Spec": {"Driver": {"Name": "file", "Options": {"path": "/home/user/.local/share/containers/storage/secrets/filedriver"}}, "Labels": {}, "Name": "secret_name"}, "UpdatedAt": "2024-01-28T20:32:08.31857841+02:00"}]

+
+
+

Authors

+
    +
  • Sagi Shnaidman (@sshnaidm)

  • +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/ansible_collections/containers/podman/docs/podman_secret_module.html b/ansible_collections/containers/podman/docs/podman_secret_module.html index e6463dc31..ace978f70 100644 --- a/ansible_collections/containers/podman/docs/podman_secret_module.html +++ b/ansible_collections/containers/podman/docs/podman_secret_module.html @@ -1,21 +1,22 @@ - - - containers.podman.podman_secret – Manage podman secrets — Python documentation + + + + containers.podman.podman_secret module – Manage podman secrets — Python documentation - - - + + + @@ -32,217 +33,186 @@
-
-

containers.podman.podman_secret – Manage podman secrets

+
+

containers.podman.podman_secret module – Manage podman secrets

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_secret.

-
-

New in version 1.7.0: of containers.podman

-
-
+

New in containers.podman 1.7.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Manage podman secrets

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- data - -
- string -
-
- -
The value of the secret. Required when state is present.
-
-
- driver - -
- string -
-
- -
Override default secrets driver, currently podman uses file which is unencrypted.
-
-
- driver_opts - -
- dictionary -
-
- -
Driver-specific key-value options.
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use it when state is present to remove and recreate an existing secret.
-
-
- name - -
- string - / required
-
- -
The name of the secret.
-
-
- skip_existing - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use it when state is present and secret with the same name already exists. If set to true, the secret will NOT be recreated and remains as is.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether to create or remove the named secret.
-
-
-
-

Examples

-
- name: Create secret
-  containers.podman.podman_secret:
-    state: present
-    name: mysecret
-    data: "my super secret content"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

data

+

string

+

The value of the secret. Required when state is present.

+
+

debug

+

boolean

+

Enable debug mode for module.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

driver

+

string

+

Override default secrets driver, currently podman uses file which is unencrypted.

+
+

driver_opts

+

dictionary

+

Driver-specific key-value options.

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

force

+

boolean

+

Use it when state is present to remove and recreate an existing secret.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

labels

+

dictionary

+

Labels to set on the secret.

+
+

name

+

string / required

+

The name of the secret.

+
+

skip_existing

+

boolean

+

Use it when state is present and secret with the same name already exists. If set to true, the secret will NOT be recreated and remains as is.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

state

+

string

+

Whether to create or remove the named secret.

+

Choices:

+
    +
  • "absent"

  • +
  • "present" ← (default)

  • +
+
+
+
+

Examples

+
- name: Create secret
+  containers.podman.podman_secret:
+    state: present
+    name: mysecret
+    data: "my super secret content"
 
-- name: Create container that uses the secret
-  containers.podman.podman_container:
-    name: showmysecret
-    image: docker.io/alpine:3.14
-    secrets:
-      - mysecret
-    detach: false
-    command: cat /run/secrets/mysecret
-    register: container
+- name: Create container that uses the secret
+  containers.podman.podman_container:
+    name: showmysecret
+    image: docker.io/alpine:3.14
+    secrets:
+      - mysecret
+    detach: false
+    command: cat /run/secrets/mysecret
+    register: container
 
-- name: Output secret data
-  debug:
-    msg: '{{ container.stdout }}'
+- name: Output secret data
+  debug:
+    msg: '{{ container.stdout }}'
 
-- name: Remove secret
-  containers.podman.podman_secret:
-    state: absent
-    name: mysecret
+- name: Remove secret
+  containers.podman.podman_secret:
+    state: absent
+    name: mysecret
 
-
+

Authors

  • Aliaksandr Mianzhynski (@amenzhinsky)

-
-
-
+ + + +
@@ -261,11 +231,48 @@

Navigation

+ + + @@ -295,8 +302,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_tag – Add an additional name to a local image — Python documentation + + + + containers.podman.podman_tag module – Add an additional name to a local image — Python documentation - - - + + + @@ -32,109 +33,98 @@
-
-

containers.podman.podman_tag – Add an additional name to a local image

+
+

containers.podman.podman_tag module – Add an additional name to a local image

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_tag.

- -
-

Synopsis

+ +
+

Synopsis

  • podman tag adds one or more additional names to locally-stored image.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- image - -
- string - / required
-
- -
Image to tag.
-
-
- target_names - -
- list - / elements=string / required
-
- -
Additional names.
-
-
-
-

Examples

-
# What modules does for example
-- containers.podman.podman_tag:
-    image: docker.io/continuumio/miniconda3
-    target_names:
-      - miniconda3
-      - miniconda
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

image

+

string / required

+

Image to tag.

+
+

target_names

+

list / elements=string / required

+

Additional names.

+
+
+
+

Examples

+
# What modules does for example
+- containers.podman.podman_tag:
+    image: docker.io/continuumio/miniconda3
+    target_names:
+      - miniconda3
+      - miniconda
 
-
+

Authors

  • Christian Bourque (@ocafebabe)

-
-
-
+ + + +
@@ -153,11 +143,48 @@

Navigation

+ + + @@ -187,8 +214,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_unshare – Run tasks using podman unshare — Python documentation + + + + containers.podman.podman_unshare become – Run tasks using podman unshare — Python documentation - - - + + + @@ -32,218 +33,187 @@
-
-

containers.podman.podman_unshare – Run tasks using podman unshare

+
+

containers.podman.podman_unshare become – Run tasks using podman unshare

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This become plugin is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman.

To use it in a playbook, specify: containers.podman.podman_unshare.

-
-

New in version 1.9.0: of containers.podman

-
-
+

New in containers.podman 1.9.0

+
-
-

Synopsis

+ +
+

Synopsis

+
+
+

Parameters

+ + + + + + + + + + + + + + + + + +

Parameter

Comments

+

become_exe

+

string

+

Sudo executable

+

Default: "sudo"

+

Configuration:

+
    +
  • INI entries:

    +
    [privilege_escalation]
    +become_exe = sudo
    +
    +
    +
    [sudo_become_plugin]
    +executable = sudo
    +
    +
    +
  • +
  • Environment variable: ANSIBLE_BECOME_EXE

  • +
  • Environment variable: ANSIBLE_SUDO_EXE

  • +
  • Variable: ansible_become_exe

  • +
  • Variable: ansible_sudo_exe

  • +
+
+

become_pass

+

string

+

Password to pass to sudo

+

Configuration:

+
    +
  • INI entry:

    +
    [sudo_become_plugin]
    +password = VALUE
    +
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    ParameterChoices/DefaultsConfigurationComments
    -
    - become_exe - -
    - string -
    -
    - Default:
    "sudo"
    -
    -
    ini entries: -

    - [privilege_escalation]
    become_exe = sudo -

    -

    - [sudo_become_plugin]
    executable = sudo -

    -
    -
    - env:ANSIBLE_BECOME_EXE -
    -
    - env:ANSIBLE_SUDO_EXE -
    -
    - var: ansible_become_exe -
    -
    - var: ansible_sudo_exe -
    -
    -
    Sudo executable
    -
    -
    - become_pass - -
    - string -
    -
    - -
    ini entries: -

    - [sudo_become_plugin]
    password = None -

    -
    -
    - env:ANSIBLE_BECOME_PASS -
    -
    - env:ANSIBLE_SUDO_PASS -
    -
    - var: ansible_become_password -
    -
    - var: ansible_become_pass -
    -
    - var: ansible_sudo_pass -
    -
    -
    Password to pass to sudo
    -
    -
    - become_user - -
    - string -
    -
    - Default:
    "root"
    -
    -
    ini entries: -

    - [privilege_escalation]
    become_user = root -

    -

    - [sudo_become_plugin]
    user = root -

    -
    -
    - env:ANSIBLE_BECOME_USER -
    -
    - env:ANSIBLE_SUDO_USER -
    -
    - var: ansible_become_user -
    -
    - var: ansible_sudo_user -
    -
    -
    User you 'become' to execute the task
    -
    -
    -
    -

    Examples

    -
    - name: checking uid of file 'foo'
    -  ansible.builtin.stat:
    -    path: "{{ test_dir }}/foo"
    -  register: foo
    -- ansible.builtin.debug:
    -    var: foo.stat.uid
    -# The output shows that it's owned by the login user
    -# ok: [test_host] => {
    -#     "foo.stat.uid": "1003"
    -# }
    +
  • +
  • Environment variable: ANSIBLE_BECOME_PASS

  • +
  • Environment variable: ANSIBLE_SUDO_PASS

  • +
  • Variable: ansible_become_password

  • +
  • Variable: ansible_become_pass

  • +
  • Variable: ansible_sudo_pass

  • +
+
+

become_user

+

string

+

User you ‘become’ to execute the task (‘root’ is not a valid value here).

+

Configuration:

+
    +
  • INI entries:

    +
    [privilege_escalation]
    +become_user = VALUE
    +
    +
    +
    [sudo_become_plugin]
    +user = VALUE
    +
    +
    +
  • +
  • Environment variable: ANSIBLE_BECOME_USER

  • +
  • Environment variable: ANSIBLE_SUDO_USER

  • +
  • Variable: ansible_become_user

  • +
  • Variable: ansible_sudo_user

  • +
+
+
+
+

Examples

+
- name: checking uid of file 'foo'
+  ansible.builtin.stat:
+    path: "{{ test_dir }}/foo"
+  register: foo
+- ansible.builtin.debug:
+    var: foo.stat.uid
+# The output shows that it's owned by the login user
+# ok: [test_host] => {
+#     "foo.stat.uid": "1003"
+# }
 
-- name: mounting the file to an unprivileged container and modifying its owner
-  containers.podman.podman_container:
-    name: chmod_foo
-    image: alpine
-    rm: yes
-    volume:
-    - "{{ test_dir }}:/opt/test:z"
-    command: chown 1000 /opt/test/foo
+- name: mounting the file to an unprivileged container and modifying its owner
+  containers.podman.podman_container:
+    name: chmod_foo
+    image: alpine
+    rm: true
+    volume:
+    - "{{ test_dir }}:/opt/test:z"
+    command: chown 1000 /opt/test/foo
 
-# Now the file 'foo' is owned by the container uid 1000,
-# which is mapped to something completaly different on the host.
-# It creates a situation when the file is unaccessible to the host user (uid 1003)
-# Running stat again, debug output will be like this:
-# ok: [test_host] => {
-#     "foo.stat.uid": "328679"
-# }
+# Now the file 'foo' is owned by the container uid 1000,
+# which is mapped to something completaly different on the host.
+# It creates a situation when the file is unaccessible to the host user (uid 1003)
+# Running stat again, debug output will be like this:
+# ok: [test_host] => {
+#     "foo.stat.uid": "328679"
+# }
 
-- name: running stat in modified user namespace
-  become_method: containers.podman.podman_unshare
-  become: yes
-  ansible.builtin.stat:
-    path: "{{ test_dir }}/foo"
-  register: foo
-# By gathering file stats with podman_ushare
-# we can see the uid set in the container:
-# ok: [test_host] => {
-#     "foo.stat.uid": "1000"
-# }
+- name: running stat in modified user namespace
+  become_method: containers.podman.podman_unshare
+  become: true
+  ansible.builtin.stat:
+    path: "{{ test_dir }}/foo"
+  register: foo
+# By gathering file stats with podman_ushare
+# we can see the uid set in the container:
+# ok: [test_host] => {
+#     "foo.stat.uid": "1000"
+# }
 
-- name: resetting file ownership with podman unshare
-  become_method: containers.podman.podman_unshare
-  become: yes
-  ansible.builtin.file:
-    state: file
-    path: "{{ test_dir }}/foo"
-    owner: 0  # in a modified user namespace host uid is mapped to 0
-# If we run stat and debug with 'become: no',
-# we can see that the file is ours again:
-# ok: [test_host] => {
-#     "foo.stat.uid": "1003"
-# }
+- name: resetting file ownership with podman unshare
+  become_method: containers.podman.podman_unshare
+  become: true
+  ansible.builtin.file:
+    state: file
+    path: "{{ test_dir }}/foo"
+    owner: 0  # in a modified user namespace host uid is mapped to 0
+# If we run stat and debug with 'become: false',
+# we can see that the file is ours again:
+# ok: [test_host] => {
+#     "foo.stat.uid": "1003"
+# }
 
-
+

Authors

  • Janos Gerzson (@grzs)

+
+

Hint

+

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.

-
-
+
+ + +
@@ -262,11 +232,48 @@

Navigation

+ + + @@ -296,8 +303,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_volume_info – Gather info about podman volumes — Python documentation + + + + containers.podman.podman_volume_info module – Gather info about podman volumes — Python documentation - - - + + + @@ -32,15 +33,19 @@
-
-

containers.podman.podman_volume_info – Gather info about podman volumes

+
+

containers.podman.podman_volume_info module – Gather info about podman volumes

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_volume_info.

-
+
-
-

Synopsis

+ +
+

Synopsis

  • Gather info about podman volumes with podman inspect command.

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

-
-
-

Parameters

- - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- name - -
- string -
-
- -
Name of the volume
-
-
-
-

Examples

-
- name: Gather info about all present volumes
-  podman_volume_info:
-
-- name: Gather info about specific volume
-  podman_volume_info:
-    name: specific_volume
+
+
+

Parameters

+ + + + + + + + + + + + + + +

Parameter

Comments

+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

name

+

string

+

Name of the volume

+
+
+
+

Examples

+
- name: Gather info about all present volumes
+  podman_volume_info:
+
+- name: Gather info about specific volume
+  podman_volume_info:
+    name: specific_volume
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- volumes - -
- list - / elements=string
-
always -
Facts from all or specified volumes
-
-
Sample:
-
[{'driver': 'local', 'labels': {}, 'mountPoint': '/home/ansible/.local/share/testvolume/_data', 'name': 'testvolume', 'options': {}, 'scope': 'local'}]
-
-

+ + + + + + + + + + + +

Key

Description

+

volumes

+

list / elements=string

+

Facts from all or specified volumes

+

Returned: always

+

Sample: [{"driver": "local", "labels": {}, "mountPoint": "/home/ansible/.local/share/testvolume/_data", "name": "testvolume", "options": {}, "scope": "local"}]

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -167,11 +159,48 @@

Navigation

+ + + @@ -201,8 +230,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | - - containers.podman.podman_volume – Manage Podman volumes — Python documentation + + + + containers.podman.podman_volume module – Manage Podman volumes — Python documentation - - - + + + @@ -32,18 +33,20 @@
-
-

containers.podman.podman_volume – Manage Podman volumes

+
+

containers.podman.podman_volume module – Manage Podman volumes

Note

-

This plugin is part of the containers.podman collection (version 1.10.1).

-

To install it use: ansible-galaxy collection install containers.podman.

+

This module is part of the containers.podman collection (version 1.11.0).

+

It is not included in ansible-core. +To check whether it is installed, run ansible-galaxy collection list.

+

To install it, use: ansible-galaxy collection install containers.podman. +You need further requirements to be able to use this module, +see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_volume.

-
-

New in version 1.1.0: of containers.podman

-
-
+

New in containers.podman 1.1.0

+
-
-

Synopsis

+ +
+

Synopsis

  • Manage Podman volumes

-
-
+
+

Requirements

The below requirements are needed on the host that executes this module.

  • podman

-
-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- debug - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Return additional information which can be helpful for investigations.
-
-
- driver - -
- string -
-
- -
Specify volume driver name (default local).
-
-
- executable - -
- string -
-
- Default:
"podman"
-
-
Path to podman executable if it is not in the $PATH on the machine running podman
-
-
- label - -
- dictionary -
-
- -
Add metadata to a pod volume (e.g., label com.example.key=value).
-
-
- name - -
- string - / required
-
- -
Name of volume.
-
-
- options - -
- list - / elements=string
-
- -
Set driver specific options. For example 'device=tpmfs', 'type=tmpfs'. UID and GID idempotency is not supported due to changes in podman.
-
-
- recreate - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Recreate volume even if exists.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
State of volume, default 'present'
-
-
-
-

Examples

-
# What modules does for example
-- podman_volume:
-    state: present
-    name: volume1
-    label:
-      key: value
-      key2: value2
-    options:
-      - "device=/dev/loop1"
-      - "type=ext4"
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

Comments

+

debug

+

boolean

+

Return additional information which can be helpful for investigations.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

driver

+

string

+

Specify volume driver name (default local).

+
+

executable

+

string

+

Path to podman executable if it is not in the $PATH on the machine running podman

+

Default: "podman"

+
+

label

+

dictionary

+

Add metadata to a pod volume (e.g., label com.example.key=value).

+
+

name

+

string / required

+

Name of volume.

+
+

options

+

list / elements=string

+

Set driver specific options. For example ‘device=tpmfs’, ‘type=tmpfs’. UID and GID idempotency is not supported due to changes in podman.

+
+

recreate

+

boolean

+

Recreate volume even if exists.

+

Choices:

+
    +
  • false ← (default)

  • +
  • true

  • +
+
+

state

+

string

+

State of volume, default ‘present’

+

Choices:

+
    +
  • "present" ← (default)

  • +
  • "absent"

  • +
+
+
+
+

Examples

+
# What modules does for example
+- podman_volume:
+    state: present
+    name: volume1
+    label:
+      key: value
+      key2: value2
+    options:
+      - "device=/dev/loop1"
+      - "type=ext4"
 
-
-
-

Return Values

+ +
+

Return Values

Common return values are documented here, the following are the fields unique to this module:

- - - - - - - - - - - -
KeyReturnedDescription
-
- volume - -
- dictionary -
-
always -
Volume inspection results if exists.
-
-
Sample:
-
{'CreatedAt': '2020-06-05T16:38:55.277628769+03:00', 'Driver': 'local', 'Labels': {'key.com': 'value', 'key.org': 'value2'}, 'Mountpoint': '/home/user/.local/share/containers/storage/volumes/test/_data', 'Name': 'test', 'Options': {}, 'Scope': 'local'}
-
-

+ + + + + + + + + + + +

Key

Description

+

volume

+

dictionary

+

Volume inspection results if exists.

+

Returned: always

+

Sample: {"CreatedAt": "2020-06-05T16:38:55.277628769+03:00", "Driver": "local", "Labels": {"key.com": "value", "key.org": "value2"}, "Mountpoint": "/home/user/.local/share/containers/storage/volumes/test/_data", "Name": "test", "Options": {}, "Scope": "local"}

+
+

Authors

  • Sagi Shnaidman (@sshnaidm)

-
-
-
+ + + +
@@ -276,11 +221,48 @@

Navigation

+ + + @@ -310,8 +292,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13 | @@ -11,10 +10,8 @@ - - - + @@ -85,6 +82,41 @@

Navigation

+
+ +

Related Topics

@@ -109,8 +141,8 @@ ©. | - Powered by Sphinx 5.0.2 - & Alabaster 0.7.12 + Powered by Sphinx 7.0.1 + & Alabaster 0.7.13
diff --git a/ansible_collections/containers/podman/plugins/module_utils/podman/common.py b/ansible_collections/containers/podman/plugins/module_utils/podman/common.py index dba3aff65..cbb6b080e 100644 --- a/ansible_collections/containers/podman/plugins/module_utils/podman/common.py +++ b/ansible_collections/containers/podman/plugins/module_utils/podman/common.py @@ -19,6 +19,25 @@ except ImportError: ' < 2.11, you need to use Python < 3.12 with ' 'distutils.version present'), exc) +ARGUMENTS_OPTS_DICT = { + '--attach': ['--attach', '-a'], + '--cpu-shares': ['--cpu-shares', '-c'], + '--detach': ['--detach', '-d'], + '--env': ['--env', '-e'], + '--hostname': ['--hostname', '-h'], + '--interactive': ['--interactive', '-i'], + '--label': ['--label', '-l'], + '--memory': ['--memory', '-m'], + '--network': ['--network', '--net'], + '--publish': ['--publish', '-p'], + '--publish-all': ['--publish-all', '-P'], + '--quiet': ['--quiet', '-q'], + '--tty': ['--tty', '-t'], + '--user': ['--user', '-u'], + '--volume': ['--volume', '-v'], + '--workdir': ['--workdir', '-w'], +} + def run_podman_command(module, executable='podman', args=None, expected_rc=0, ignore_errors=False): if not isinstance(executable, list): @@ -50,8 +69,15 @@ def run_generate_systemd_command(module, module_params, name, version): command.extend([ '--restart-policy', sysconf['restart_policy']]) - if sysconf.get('time'): - command.extend(['--time', str(sysconf['time'])]) + if sysconf.get('restart_sec') is not None: + command.extend(['--restart-sec=%s' % sysconf['restart_sec']]) + if (sysconf.get('stop_timeout') is not None) or (sysconf.get('time') is not None): + # Select correct parameter name based on version + arg_name = 'stop-timeout' if gt4ver else 'time' + arg_value = sysconf.get('stop_timeout') if sysconf.get('stop_timeout') is not None else sysconf.get('time') + command.extend(['--%s=%s' % (arg_name, arg_value)]) + if sysconf.get('start_timeout') is not None: + command.extend(['--start-timeout=%s' % sysconf['start_timeout']]) if sysconf.get('no_header'): command.extend(['--no-header']) if sysconf.get('names', True): @@ -96,34 +122,103 @@ def run_generate_systemd_command(module, module_params, name, version): return rc, systemd, err +def compare_systemd_file_content(file_path, file_content): + if not os.path.exists(file_path): + # File does not exist, so all lines in file_content are different + return '', file_content + # Read the file + with open(file_path, 'r') as unit_file: + current_unit_file_content = unit_file.read() + + # Function to remove comments from file content + def remove_comments(content): + return "\n".join([line for line in content.splitlines() if not line.startswith('#')]) + + # Remove comments from both file contents before comparison + current_unit_file_content_nocmnt = remove_comments(current_unit_file_content) + unit_content_nocmnt = remove_comments(file_content) + if current_unit_file_content_nocmnt == unit_content_nocmnt: + return None + + # Get the different lines between the two contents + diff_in_file = [line + for line in unit_content_nocmnt.splitlines() + if line not in current_unit_file_content_nocmnt.splitlines()] + diff_in_string = [line + for line in current_unit_file_content_nocmnt.splitlines() + if line not in unit_content_nocmnt.splitlines()] + + return diff_in_string, diff_in_file + + def generate_systemd(module, module_params, name, version): - empty = {} + result = { + 'changed': False, + 'systemd': {}, + 'diff': {}, + } sysconf = module_params['generate_systemd'] rc, systemd, err = run_generate_systemd_command(module, module_params, name, version) if rc != 0: module.log( "PODMAN-CONTAINER-DEBUG: Error generating systemd: %s" % err) - return empty + if sysconf: + module.fail_json(msg="Error generating systemd: %s" % err) + return result else: try: data = json.loads(systemd) + result['systemd'] = data if sysconf.get('path'): full_path = os.path.expanduser(sysconf['path']) if not os.path.exists(full_path): os.makedirs(full_path) + result['changed'] = True if not os.path.isdir(full_path): module.fail_json("Path %s is not a directory! " "Can not save systemd unit files there!" % full_path) for file_name, file_content in data.items(): file_name += ".service" + if not os.path.exists(os.path.join(full_path, file_name)): + result['changed'] = True + if result['diff'].get('before') is None: + result['diff'] = {'before': {}, 'after': {}} + result['diff']['before'].update( + {'systemd_{file_name}.service'.format(file_name=file_name): ''}) + result['diff']['after'].update( + {'systemd_{file_name}.service'.format(file_name=file_name): file_content}) + + else: + diff_ = compare_systemd_file_content(os.path.join(full_path, file_name), file_content) + if diff_: + result['changed'] = True + if result['diff'].get('before') is None: + result['diff'] = {'before': {}, 'after': {}} + result['diff']['before'].update( + {'systemd_{file_name}.service'.format(file_name=file_name): "\n".join(diff_[0])}) + result['diff']['after'].update( + {'systemd_{file_name}.service'.format(file_name=file_name): "\n".join(diff_[1])}) with open(os.path.join(full_path, file_name), 'w') as f: f.write(file_content) - return data + diff_before = "\n".join( + ["{j} - {k}".format(j=j, k=k) + for j, k in result['diff'].get('before', {}).items() if 'PIDFile' not in k]).strip() + diff_after = "\n".join( + ["{j} - {k}".format(j=j, k=k) + for j, k in result['diff'].get('after', {}).items() if 'PIDFile' not in k]).strip() + if diff_before or diff_after: + result['diff']['before'] = diff_before + "\n" + result['diff']['after'] = diff_after + "\n" + else: + result['diff'] = {} + return result except Exception as e: module.log( "PODMAN-CONTAINER-DEBUG: Error writing systemd: %s" % e) - return empty + if sysconf: + module.fail_json(msg="Error writing systemd: %s" % e) + return result def delete_systemd(module, module_params, name, version): @@ -230,3 +325,15 @@ def normalize_signal(signal_name_or_number): if signal_name not in _signal_map: raise RuntimeError("Unknown signal '{0}'".format(signal_name_or_number)) return str(_signal_map[signal_name]) + + +def get_podman_version(module, fail=True): + executable = module.params['executable'] if module.params['executable'] else 'podman' + rc, out, err = module.run_command( + [executable, b'--version']) + if rc != 0 or not out or "version" not in out: + if fail: + module.fail_json(msg="'%s --version' run failed! Error: %s" % + (executable, err)) + return None + return out.split("version")[1].strip() diff --git a/ansible_collections/containers/podman/plugins/module_utils/podman/podman_container_lib.py b/ansible_collections/containers/podman/plugins/module_utils/podman/podman_container_lib.py index 1ba28f4c8..ff4c18629 100644 --- a/ansible_collections/containers/podman/plugins/module_utils/podman/podman_container_lib.py +++ b/ansible_collections/containers/podman/plugins/module_utils/podman/podman_container_lib.py @@ -9,6 +9,7 @@ from ansible_collections.containers.podman.plugins.module_utils.podman.common im from ansible_collections.containers.podman.plugins.module_utils.podman.common import generate_systemd from ansible_collections.containers.podman.plugins.module_utils.podman.common import delete_systemd from ansible_collections.containers.podman.plugins.module_utils.podman.common import normalize_signal +from ansible_collections.containers.podman.plugins.module_utils.podman.common import ARGUMENTS_OPTS_DICT __metaclass__ = type @@ -19,6 +20,7 @@ ARGUMENTS_SPEC_CONTAINER = dict( 'absent', 'present', 'stopped', 'started', 'created']), image=dict(type='str'), annotation=dict(type='dict'), + attach=dict(type='list', elements='str', choices=['stdout', 'stderr', 'stdin']), authfile=dict(type='path'), blkio_weight=dict(type='int'), blkio_weight_device=dict(type='dict'), @@ -32,12 +34,16 @@ ARGUMENTS_SPEC_CONTAINER = dict( conmon_pidfile=dict(type='path'), command=dict(type='raw'), cpu_period=dict(type='int'), + cpu_quota=dict(type='int'), cpu_rt_period=dict(type='int'), cpu_rt_runtime=dict(type='int'), cpu_shares=dict(type='int'), cpus=dict(type='str'), cpuset_cpus=dict(type='str'), cpuset_mems=dict(type='str'), + delete_depend=dict(type='bool'), + delete_time=dict(type='str'), + delete_volumes=dict(type='bool'), detach=dict(type='bool', default=True), debug=dict(type='bool', default=False), detach_keys=dict(type='str', no_log=False), @@ -51,13 +57,14 @@ ARGUMENTS_SPEC_CONTAINER = dict( dns_search=dict(type='str', aliases=['dns_search_domains']), entrypoint=dict(type='str'), env=dict(type='dict'), - env_file=dict(type='path'), + env_file=dict(type='list', elements='path', aliases=['env_files']), env_host=dict(type='bool'), etc_hosts=dict(type='dict', aliases=['add_hosts']), expose=dict(type='list', elements='str', aliases=[ 'exposed', 'exposed_ports']), force_restart=dict(type='bool', default=False, aliases=['restart']), + force_delete=dict(type='bool', default=True), generate_systemd=dict(type='dict', default={}), gidmap=dict(type='list', elements='str'), group_add=dict(type='list', elements='str', aliases=['groups']), @@ -66,6 +73,8 @@ ARGUMENTS_SPEC_CONTAINER = dict( healthcheck_retries=dict(type='int'), healthcheck_start_period=dict(type='str'), healthcheck_timeout=dict(type='str'), + healthcheck_failure_action=dict(type='str', choices=[ + 'none', 'kill', 'restart', 'stop']), hooks_dir=dict(type='list', elements='str'), hostname=dict(type='str'), http_proxy=dict(type='bool'), @@ -112,6 +121,7 @@ ARGUMENTS_SPEC_CONTAINER = dict( recreate=dict(type='bool', default=False), requires=dict(type='list', elements='str'), restart_policy=dict(type='str'), + restart_time=dict(type='str'), rm=dict(type='bool', aliases=['remove', 'auto_remove']), rootfs=dict(type='bool'), secrets=dict(type='list', elements='str', no_log=True), @@ -121,6 +131,7 @@ ARGUMENTS_SPEC_CONTAINER = dict( sig_proxy=dict(type='bool'), stop_signal=dict(type='int'), stop_timeout=dict(type='int'), + stop_time=dict(type='str'), subgidname=dict(type='str'), subuidname=dict(type='str'), sysctl=dict(type='dict'), @@ -227,12 +238,35 @@ class PodmanModuleParams: def start_stop_delete(self): + def complete_params(cmd): + if self.params['attach'] and self.action == 'start': + cmd.append('--attach') + if self.params['detach'] is False and self.action == 'start' and '--attach' not in cmd: + cmd.append('--attach') + if self.params['detach_keys'] and self.action == 'start': + cmd += ['--detach-keys', self.params['detach_keys']] + if self.params['sig_proxy'] and self.action == 'start': + cmd.append('--sig-proxy') + if self.params['stop_time'] and self.action == 'stop': + cmd += ['--time', self.params['stop_time']] + if self.params['restart_time'] and self.action == 'restart': + cmd += ['--time', self.params['restart_time']] + if self.params['delete_depend'] and self.action == 'delete': + cmd.append('--depend') + if self.params['delete_time'] and self.action == 'delete': + cmd += ['--time', self.params['delete_time']] + if self.params['delete_volumes'] and self.action == 'delete': + cmd.append('--volumes') + if self.params['force_delete'] and self.action == 'delete': + cmd.append('--force') + return cmd + if self.action in ['stop', 'start', 'restart']: - cmd = [self.action, self.params['name']] + cmd = complete_params([self.action]) + [self.params['name']] return [to_bytes(i, errors='surrogate_or_strict') for i in cmd] if self.action == 'delete': - cmd = ['rm', '-f', self.params['name']] + cmd = complete_params(['rm']) + [self.params['name']] return [to_bytes(i, errors='surrogate_or_strict') for i in cmd] def check_version(self, param, minv=None, maxv=None): @@ -252,6 +286,11 @@ class PodmanModuleParams: c += ['--annotation', '='.join(annotate)] return c + def addparam_attach(self, c): + for attach in self.params['attach']: + c += ['--attach=%s' % attach] + return c + def addparam_authfile(self, c): return c + ['--authfile', self.params['authfile']] @@ -293,6 +332,9 @@ class PodmanModuleParams: def addparam_cpu_period(self, c): return c + ['--cpu-period', self.params['cpu_period']] + def addparam_cpu_quota(self, c): + return c + ['--cpu-quota', self.params['cpu_quota']] + def addparam_cpu_rt_period(self, c): return c + ['--cpu-rt-period', self.params['cpu_rt_period']] @@ -312,6 +354,9 @@ class PodmanModuleParams: return c + ['--cpuset-mems', self.params['cpuset_mems']] def addparam_detach(self, c): + # Remove detach from create command and don't set if attach is true + if self.action == 'create' or self.params['attach']: + return c return c + ['--detach=%s' % self.params['detach']] def addparam_detach_keys(self, c): @@ -362,7 +407,9 @@ class PodmanModuleParams: return c def addparam_env_file(self, c): - return c + ['--env-file', self.params['env_file']] + for env_file in self.params['env_file']: + c += ['--env-file', env_file] + return c def addparam_env_host(self, c): self.check_version('--env-host', minv='1.5.0') @@ -407,6 +454,10 @@ class PodmanModuleParams: return c + ['--healthcheck-timeout', self.params['healthcheck_timeout']] + def addparam_healthcheck_failure_action(self, c): + return c + ['--health-on-failure', + self.params['healthcheck_failure_action']] + def addparam_hooks_dir(self, c): for hook_dir in self.params['hooks_dir']: c += ['--hooks-dir=%s' % hook_dir] @@ -722,6 +773,35 @@ class PodmanContainerDiff: params_with_defaults[p] = self.module_params[p] return params_with_defaults + def _createcommand(self, argument): + """Returns list of values for given argument from CreateCommand + from Podman container inspect output. + + Args: + argument (str): argument name + + Returns: + + all_values: list of values for given argument from createcommand + """ + if "createcommand" not in self.info["config"]: + return [] + cr_com = self.info["config"]["createcommand"] + argument_values = ARGUMENTS_OPTS_DICT.get(argument, [argument]) + all_values = [] + for arg in argument_values: + for ind, cr_opt in enumerate(cr_com): + if arg == cr_opt: + # This is a key=value argument + if not cr_com[ind + 1].startswith("-"): + all_values.append(cr_com[ind + 1]) + else: + # This is a false/true switching argument + return [True] + if cr_opt.startswith("%s=" % arg): + all_values.append(cr_opt.split("=", 1)[1]) + return all_values + def _diff_update_and_compare(self, param_name, before, after): if before != after: self.diff['before'].update({param_name: before}) @@ -737,7 +817,7 @@ class PodmanContainerDiff: return self._diff_update_and_compare('annotation', before, after) def diffparam_env_host(self): - # It's impossible to get from inspest, recreate it if not default + # It's impossible to get from inspect, recreate it if not default before = False after = self.params['env_host'] return self._diff_update_and_compare('env_host', before, after) @@ -826,9 +906,16 @@ class PodmanContainerDiff: def diffparam_cpu_period(self): before = self.info['hostconfig']['cpuperiod'] - after = self.params['cpu_period'] + # if cpu_period left to default keep settings + after = self.params['cpu_period'] or before return self._diff_update_and_compare('cpu_period', before, after) + def diffparam_cpu_quota(self): + before = self.info['hostconfig']['cpuquota'] + # if cpu_quota left to default keep settings + after = self.params['cpu_quota'] or before + return self._diff_update_and_compare('cpu_quota', before, after) + def diffparam_cpu_rt_period(self): before = self.info['hostconfig']['cpurealtimeperiod'] after = self.params['cpu_rt_period'] @@ -845,8 +932,9 @@ class PodmanContainerDiff: return self._diff_update_and_compare('cpu_shares', before, after) def diffparam_cpus(self): - before = int(self.info['hostconfig']['nanocpus']) / 1000000000 - after = self.params['cpus'] + before = self.info['hostconfig']['nanocpus'] / 1000000000 + # if cpus left to default keep settings + after = float(self.params['cpus'] or before) return self._diff_update_and_compare('cpus', before, after) def diffparam_cpuset_cpus(self): @@ -863,16 +951,13 @@ class PodmanContainerDiff: before = [":".join([i['pathonhost'], i['pathincontainer']]) for i in self.info['hostconfig']['devices']] if not before and 'createcommand' in self.info['config']: - cr_com = self.info['config']['createcommand'] - if '--device' in cr_com: - before = [cr_com[k + 1].lower() - for k, i in enumerate(cr_com) if i == '--device'] + before = [i.lower() for i in self._createcommand('--device')] before = [":".join((i, i)) if len(i.split(":")) == 1 else i for i in before] after = [":".join(i.split(":")[:2]) for i in self.params['device']] after = [":".join((i, i)) if len(i.split(":")) == 1 else i for i in after] - after = [i.lower() for i in after] + before, after = [i.lower() for i in before], [i.lower() for i in after] before, after = sorted(list(set(before))), sorted(list(set(after))) return self._diff_update_and_compare('devices', before, after) @@ -931,15 +1016,23 @@ class PodmanContainerDiff: # Healthcheck is only defined in container config if a healthcheck # was configured; otherwise the config key isn't part of the config. def diffparam_healthcheck(self): + before = '' if 'healthcheck' in self.info['config']: # the "test" key is a list of 2 items where the first one is # "CMD-SHELL" and the second one is the actual healthcheck command. - before = self.info['config']['healthcheck']['test'][1] - else: - before = '' + if len(self.info['config']['healthcheck']['test']) > 1: + before = self.info['config']['healthcheck']['test'][1] after = self.params['healthcheck'] or before return self._diff_update_and_compare('healthcheck', before, after) + def diffparam_healthcheck_failure_action(self): + if 'healthcheckonfailureaction' in self.info['config']: + before = self.info['config']['healthcheckonfailureaction'] + else: + before = '' + after = self.params['healthcheck_failure_action'] or before + return self._diff_update_and_compare('healthcheckonfailureaction', before, after) + # Because of hostname is random generated, this parameter has partial idempotency only. def diffparam_hostname(self): before = self.info['config']['hostname'] @@ -1066,9 +1159,8 @@ class PodmanContainerDiff: if macs: before = macs[0] if not before and 'createcommand' in self.info['config']: - cr_com = self.info['config']['createcommand'] - if '--mac-address' in cr_com: - before = cr_com[cr_com.index('--mac-address') + 1].lower() + before = [i.lower() for i in self._createcommand('--mac-address')] + before = before[0] if before else '' if self.module_params['mac_address'] is not None: after = self.params['mac_address'] else: @@ -1084,11 +1176,10 @@ class PodmanContainerDiff: before = [] # Special case for options for slirp4netns rootless networking from v2 if net_mode_before == 'slirp4netns' and 'createcommand' in self.info['config']: - cr_com = self.info['config']['createcommand'] - if '--network' in cr_com: - cr_net = cr_com[cr_com.index('--network') + 1].lower() - if 'slirp4netns:' in cr_net: - before = [cr_net] + cr_net = [i.lower() for i in self._createcommand('--network')] + for cr_net_opt in cr_net: + if 'slirp4netns:' in cr_net_opt: + before = [cr_net_opt] after = self.params['network'] or [] # If container is in pod and no networks are provided if not self.module_params['network'] and self.params['pod']: @@ -1124,8 +1215,19 @@ class PodmanContainerDiff: return self._diff_update_and_compare('privileged', before, after) def diffparam_pid(self): + def get_container_id_by_name(name): + rc, podman_inspect_info, err = self.module.run_command( + [self.module.params["executable"], "inspect", name, "-f", "{{.Id}}"]) + if rc != 0: + return None + return podman_inspect_info.strip() + before = self.info['hostconfig']['pidmode'] after = self.params['pid'] + if after is not None and "container:" in after and "container:" in before: + if after.split(":")[1] == before.split(":")[1]: + return self._diff_update_and_compare('pid', before, after) + after = "container:" + get_container_id_by_name(after.split(":")[1]) return self._diff_update_and_compare('pid', before, after) # TODO(sshnaidm) Need to add port ranges support @@ -1150,7 +1252,7 @@ class PodmanContainerDiff: if image_ports: after += list(image_ports.keys()) after = [ - i.replace("/tcp", "").replace("[", "").replace("]", "") + i.replace("/tcp", "").replace("[", "").replace("]", "").replace("0.0.0.0:", "") for i in after] # No support for port ranges yet for ports in after: @@ -1166,7 +1268,15 @@ class PodmanContainerDiff: def diffparam_restart_policy(self): before = self.info['hostconfig']['restartpolicy']['name'] + before_max_count = int(self.info['hostconfig']['restartpolicy'].get('maximumretrycount', 0)) after = self.params['restart_policy'] or "" + if ':' in after: + after, after_max_count = after.rsplit(':', 1) + after_max_count = int(after_max_count) + else: + after_max_count = 0 + before = "%s:%i" % (before, before_max_count) + after = "%s:%i" % (after, after_max_count) return self._diff_update_and_compare('restart_policy', before, after) def diffparam_rm(self): @@ -1175,11 +1285,16 @@ class PodmanContainerDiff: return self._diff_update_and_compare('rm', before, after) def diffparam_security_opt(self): - before = self.info['hostconfig']['securityopt'] - # In rootful containers with apparmor there is a default security opt - before = [o for o in before if 'apparmor=containers-default' not in o] - after = self.params['security_opt'] - before, after = sorted(list(set(before))), sorted(list(set(after))) + unsorted_before = self.info['hostconfig']['securityopt'] + unsorted_after = self.params['security_opt'] + # In rootful containers with apparmor there is a profile, "container-default", + # which is already added by default + # Since SElinux labels are basically annotations, they are merged in a single list + # element by podman so we need to split them in a (sorted) list if we want to compare it + # to the list we provide to the module + before = sorted(item for element in unsorted_before for item in element.split(',') + if 'apparmor=container-default' not in item) + after = sorted(list(set(unsorted_after))) return self._diff_update_and_compare('security_opt', before, after) def diffparam_stop_signal(self): @@ -1206,11 +1321,7 @@ class PodmanContainerDiff: after = self.params['ulimit'] or [] # In case of latest podman if 'createcommand' in self.info['config']: - ulimits = [] - for k, c in enumerate(self.info['config']['createcommand']): - if c == '--ulimit': - ulimits.append(self.info['config']['createcommand'][k + 1]) - before = ulimits + before = self._createcommand('--ulimit') before, after = sorted(before), sorted(after) return self._diff_update_and_compare('ulimit', before, after) if after: @@ -1428,8 +1539,6 @@ class PodmanContainer: self.version, self.module, ).construct_command_from_params() - if action == 'create': - b_command.remove(b'--detach=True') full_cmd = " ".join([self.module_params['executable']] + [to_native(i) for i in b_command]) self.actions.append(full_cmd) @@ -1449,7 +1558,7 @@ class PodmanContainer: self.stderr = err if rc != 0: self.module.fail_json( - msg="Can't %s container %s" % (action, self.name), + msg="Container %s exited with code %s when %sed" % (self.name, rc, action), stdout=out, stderr=err) def run(self): @@ -1547,11 +1656,19 @@ class PodmanManager: self.results.update({'diff': self.container.diff}) if self.module.params['debug'] or self.module_params['debug']: self.results.update({'podman_version': self.container.version}) + sysd = generate_systemd(self.module, + self.module_params, + self.name, + self.container.version) + self.results['changed'] = changed or sysd['changed'] self.results.update( - {'podman_systemd': generate_systemd(self.module, - self.module_params, - self.name, - self.container.version)}) + {'podman_systemd': sysd['systemd']}) + if sysd['diff']: + if 'diff' not in self.results: + self.results.update({'diff': sysd['diff']}) + else: + self.results['diff']['before'] += sysd['diff']['before'] + self.results['diff']['after'] += sysd['diff']['after'] def make_started(self): """Run actions if desired state is 'started'.""" @@ -1601,7 +1718,8 @@ class PodmanManager: self.results['actions'].append('started %s' % self.container.name) self.update_container_result() return - elif self.container.stopped and self.container.different: + elif self.container.stopped and \ + (self.container.different or self.recreate): self.container.recreate_run() self.results['actions'].append('recreated %s' % self.container.name) diff --git a/ansible_collections/containers/podman/plugins/module_utils/podman/podman_pod_lib.py b/ansible_collections/containers/podman/plugins/module_utils/podman/podman_pod_lib.py index 0b4afc0bc..4106136e2 100644 --- a/ansible_collections/containers/podman/plugins/module_utils/podman/podman_pod_lib.py +++ b/ansible_collections/containers/podman/plugins/module_utils/podman/podman_pod_lib.py @@ -27,10 +27,15 @@ ARGUMENTS_SPEC_POD = dict( recreate=dict(type='bool', default=False), add_host=dict(type='list', required=False, elements='str'), cgroup_parent=dict(type='str', required=False), + blkio_weight=dict(type='str', required=False), + blkio_weight_device=dict(type='list', elements='str', required=False), cpus=dict(type='str', required=False), cpuset_cpus=dict(type='str', required=False), + cpuset_mems=dict(type='str', required=False), + cpu_shares=dict(type='str', required=False), device=dict(type='list', elements='str', required=False), device_read_bps=dict(type='list', elements='str', required=False), + device_write_bps=dict(type='list', elements='str', required=False), dns=dict(type='list', elements='str', required=False), dns_opt=dict(type='list', elements='str', required=False), dns_search=dict(type='list', elements='str', required=False), @@ -46,6 +51,8 @@ ARGUMENTS_SPEC_POD = dict( label=dict(type='dict', required=False), label_file=dict(type='str', required=False), mac_address=dict(type='str', required=False), + memory=dict(type='str', required=False), + memory_swap=dict(type='str', required=False), name=dict(type='str', required=True), network=dict(type='list', elements='str', required=False), network_alias=dict(type='list', elements='str', required=False, @@ -135,25 +142,52 @@ class PodmanPodModuleParams: c += ['--add-host', g] return c + def addparam_blkio_weight(self, c): + self.check_version('--blkio-weight', minv='4.3.0') + return c + ['--blkio-weight', self.params['blkio_weight']] + + def addparam_blkio_weight_device(self, c): + self.check_version('--blkio-weight-device', minv='4.3.0') + for dev in self.params['blkio_weight_device']: + c += ['--blkio-weight-device', dev] + return c + def addparam_cgroup_parent(self, c): return c + ['--cgroup-parent', self.params['cgroup_parent']] def addparam_cpus(self, c): + self.check_version('--cpus', minv='4.2.0') return c + ['--cpus', self.params['cpus']] def addparam_cpuset_cpus(self, c): + self.check_version('--cpus', minv='4.2.0') return c + ['--cpuset-cpus', self.params['cpuset_cpus']] + def addparam_cpuset_mems(self, c): + self.check_version('--cpuset-mems', minv='4.3.0') + return c + ['--cpuset-mems', self.params['cpuset_mems']] + + def addparam_cpu_shares(self, c): + self.check_version('--cpu-shares', minv='4.3.0') + return c + ['--cpu-shares', self.params['cpu_shares']] + def addparam_device(self, c): for dev in self.params['device']: c += ['--device', dev] return c def addparam_device_read_bps(self, c): + self.check_version('--device-read-bps', minv='4.3.0') for dev in self.params['device_read_bps']: c += ['--device-read-bps', dev] return c + def addparam_device_write_bps(self, c): + self.check_version('--device-write-bps', minv='4.3.0') + for dev in self.params['device_write_bps']: + c += ['--device-write-bps', dev] + return c + def addparam_dns(self, c): for g in self.params['dns']: c += ['--dns', g] @@ -209,6 +243,14 @@ class PodmanPodModuleParams: def addparam_mac_address(self, c): return c + ['--mac-address', self.params['mac_address']] + def addparam_memory(self, c): + self.check_version('--memory', minv='4.2.0') + return c + ['--memory', self.params['memory']] + + def addparam_memory_swap(self, c): + self.check_version('--memory-swap', minv='4.3.0') + return c + ['--memory-swap', self.params['memory_swap']] + def addparam_name(self, c): return c + ['--name', self.params['name']] @@ -323,10 +365,8 @@ class PodmanPodDiff: return self._diff_update_and_compare('add_host', before, after) def diffparam_cgroup_parent(self): - if 'cgroupparent' in self.info: - before = self.info['cgroupparent'] - elif 'config' in self.info and self.info['config'].get('cgroupparent'): - before = self.info['config']['cgroupparent'] + before = (self.info.get('cgroupparent', '') + or self.info.get('hostconfig', {}).get('cgroupparent', '')) after = self.params['cgroup_parent'] or before return self._diff_update_and_compare('cgroup_parent', before, after) @@ -511,7 +551,7 @@ class PodmanPodDiff: # TODO: find out why on Ubuntu the 'net' is not present if 'net' not in before: after.remove('net') - if self.params["uidmap"] or self.params["gidmap"]: + if self.params["uidmap"] or self.params["gidmap"] or self.params["userns"]: after.append('user') before, after = sorted(list(set(before))), sorted(list(set(after))) @@ -759,11 +799,19 @@ class PodmanPodManager: self.results.update({'diff': self.pod.diff}) if self.module.params['debug'] or self.module_params['debug']: self.results.update({'podman_version': self.pod.version}) + sysd = generate_systemd(self.module, + self.module_params, + self.name, + self.pod.version) + self.results['changed'] = changed or sysd['changed'] self.results.update( - {'podman_systemd': generate_systemd(self.module, - self.module_params, - self.name, - self.pod.version)}) + {'podman_systemd': sysd['systemd']}) + if sysd['diff']: + if 'diff' not in self.results: + self.results.update({'diff': sysd['diff']}) + else: + self.results['diff']['before'] += sysd['diff']['before'] + self.results['diff']['after'] += sysd['diff']['after'] def execute(self): """Execute the desired action according to map of actions & states.""" diff --git a/ansible_collections/containers/podman/plugins/modules/podman_container.py b/ansible_collections/containers/podman/plugins/modules/podman_container.py index 7878352da..51cb57a53 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_container.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_container.py @@ -76,6 +76,15 @@ options: - Add an annotation to the container. The format is key value, multiple times. type: dict + attach: + description: + - Attach to STDIN, STDOUT or STDERR. The default in Podman is false. + type: list + elements: str + choices: + - stdin + - stdout + - stderr authfile: description: - Path of the authentication file. Default is @@ -149,7 +158,11 @@ options: type: raw cpu_period: description: - - Limit the CPU real-time period in microseconds + - Limit the CPU CFS (Completely Fair Scheduler) period + type: int + cpu_quota: + description: + - Limit the CPU CFS (Completely Fair Scheduler) quota type: int cpu_rt_period: description: @@ -180,6 +193,22 @@ options: - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. type: str + delete_depend: + description: + - Remove selected container and recursively remove all containers that depend on it. + Applies to "delete" command. + type: bool + delete_time: + description: + - Seconds to wait before forcibly stopping the container. Use -1 for infinite wait. + Applies to "delete" command. + type: str + delete_volumes: + description: + - Remove anonymous volumes associated with the container. + This does not include named volumes created with podman volume create, + or the --volume option of podman run and podman create. + type: bool detach: description: - Run container in detach mode @@ -262,7 +291,14 @@ options: - Read in a line delimited file of environment variables. Doesn't support idempotency. If users changes the file with environment variables it's on them to recreate the container. - type: path + The file must be present on the REMOTE machine where actual podman is + running, not on the controller machine where Ansible is executing. + If you need to copy the file from controller to remote machine, use the + copy or slurp module. + type: list + elements: path + aliases: + - env_files env_host: description: - Use all current host environment variables in container. @@ -292,6 +328,11 @@ options: default: False aliases: - restart + force_delete: + description: + - Force deletion of container when it's being deleted. + type: bool + default: True generate_systemd: description: - Generate systemd unit file for container. @@ -319,11 +360,21 @@ options: - 'on-watchdog' - 'on-abort' - 'always' - time: + restart_sec: + description: Set the systemd service restartsec value. + type: int + required: false + start_timeout: + description: Override the default start timeout for the container with the given value. + type: int + required: false + stop_timeout: description: - - Override the default stop timeout for the container with the given value. + - Override the default stop timeout for the container with the given value. Called `time` before version 4. type: int required: false + aliases: + - time no_header: description: - Do not generate the header including meta data such as the Podman version and the timestamp. @@ -416,6 +467,17 @@ options: is considered failed. Like start-period, the value can be expressed in a time format such as 1m22s. The default value is 30s type: str + healthcheck_failure_action: + description: + - The action to be taken when the container is considered unhealthy. The action must be one of + "none", "kill", "restart", or "stop". + The default policy is "none". + type: str + choices: + - 'none' + - 'kill' + - 'restart' + - 'stop' hooks_dir: description: - Each .json file in the path configures a hook for Podman containers. @@ -693,6 +755,11 @@ options: * always - Restart containers when they exit, regardless of status, retrying indefinitely type: str + restart_time: + description: + - Seconds to wait before forcibly stopping the container when restarting. Use -1 for infinite wait. + Applies to "restarted" status. + type: str rm: description: - Automatically remove the container when it exits. The default is false. @@ -740,6 +807,11 @@ options: description: - Signal to stop a container. Default is SIGTERM. type: int + stop_time: + description: + - Seconds to wait before forcibly stopping the container. Use -1 for infinite wait. + Applies to "stopped" status. + type: str stop_timeout: description: - Timeout (in seconds) to stop a container. Default is 10. @@ -860,7 +932,7 @@ EXAMPLES = r""" generate_systemd: path: /tmp/ restart_policy: always - time: 120 + stop_timeout: 120 names: true container_prefix: ainer @@ -912,6 +984,16 @@ EXAMPLES = r""" image: busybox log_options: path=/var/log/container/mycontainer.json log_driver: k8s-file + +- name: Run container with complex command with quotes + containers.podman.podman_container: + name: mycontainer + image: certbot/certbot + command: + - renew + - --deploy-hook + - "echo 1 > /var/lib/letsencrypt/complete" + """ RETURN = r""" diff --git a/ansible_collections/containers/podman/plugins/modules/podman_container_exec.py b/ansible_collections/containers/podman/plugins/modules/podman_container_exec.py new file mode 100644 index 000000000..d30e85cdb --- /dev/null +++ b/ansible_collections/containers/podman/plugins/modules/podman_container_exec.py @@ -0,0 +1,244 @@ +#!/usr/bin/python +# coding: utf-8 -*- + +# Copyright (c) 2023, Takuya Nishimura <@nishipy> +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import absolute_import, division, print_function +__metaclass__ = type + +DOCUMENTATION = r''' +module: podman_container_exec +author: + - Takuya Nishimura (@nishipy) +short_description: Executes a command in a running container. +description: + - Executes a command in a running container. +options: + name: + description: + - Name of the container where the command is executed. + type: str + required: true + command: + description: + - The command to run in the container. + - One of the I(command) or I(args) is required. + type: str + argv: + description: + - Passes the command as a list rather than a string. + - One of the I(command) or I(args) is required. + type: list + elements: str + detach: + description: + - If true, the command runs in the background. + - The exec session is automatically removed when it completes. + type: bool + default: false + env: + description: + - Set environment variables. + type: dict + privileged: + description: + - Give extended privileges to the container. + type: bool + default: false + tty: + description: + - Allocate a pseudo-TTY. + type: bool + default: false + user: + description: + - The username or UID used and, optionally, the groupname or GID for the specified command. + - Both user and group may be symbolic or numeric. + type: str + workdir: + description: + - Working directory inside the container. + type: str +requirements: + - podman +notes: + - See L(the Podman documentation,https://docs.podman.io/en/latest/markdown/podman-exec.1.html) for details of podman-exec(1). +''' + +EXAMPLES = r''' +- name: Execute a command with workdir + containers.podman.podman_container_exec: + name: ubi8 + command: "cat redhat-release" + workdir: /etc + +- name: Execute a command with a list of args and environment variables + containers.podman.podman_container_exec: + name: test_container + argv: + - /bin/sh + - -c + - echo $HELLO $BYE + env: + HELLO: hello world + BYE: goodbye world + +- name: Execute command in background by using detach + containers.podman.podman_container_exec: + name: detach_container + command: "cat redhat-release" + detach: true +''' + +RETURN = r''' +stdout: + type: str + returned: success + description: + - The standard output of the command executed in the container. +stderr: + type: str + returned: success + description: + - The standard output of the command executed in the container. +rc: + type: int + returned: success + sample: 0 + description: + - The exit code of the command executed in the container. +exec_id: + type: str + returned: success and I(detach=true) + sample: f99002e34c1087fd1aa08d5027e455bf7c2d6b74f019069acf6462a96ddf2a47 + description: + - The ID of the exec session. +''' + + +import shlex +from ansible.module_utils.six import string_types +from ansible.module_utils._text import to_text +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.containers.podman.plugins.module_utils.podman.common import run_podman_command + + +def run_container_exec(module: AnsibleModule) -> dict: + ''' + Execute podman-container-exec for the given options + ''' + exec_with_args = ['container', 'exec'] + # podman_container_exec always returns changed=true + changed = True + exec_options = [] + + name = module.params['name'] + argv = module.params['argv'] + command = module.params['command'] + detach = module.params['detach'] + env = module.params['env'] + privileged = module.params['privileged'] + tty = module.params['tty'] + user = module.params['user'] + workdir = module.params['workdir'] + + if command is not None: + argv = shlex.split(command) + + if detach: + exec_options.append('--detach') + + if env is not None: + for key, value in env.items(): + if not isinstance(value, string_types): + module.fail_json( + msg="Specify string value %s on the env field" % (value)) + + to_text(value, errors='surrogate_or_strict') + exec_options += ['--env', + '%s="%s"' % (key, value)] + + if privileged: + exec_options.append('--privileged') + + if tty: + exec_options.append('--tty') + + if user is not None: + exec_options += ['--user', + to_text(user, errors='surrogate_or_strict')] + + if workdir is not None: + exec_options += ['--workdir', + to_text(workdir, errors='surrogate_or_strict')] + + exec_options.append(name) + exec_options.extend(argv) + + exec_with_args.extend(exec_options) + + rc, stdout, stderr = run_podman_command( + module=module, executable='podman', args=exec_with_args) + + result = { + 'changed': changed, + 'podman_command': exec_options, + 'rc': rc, + 'stdout': stdout, + 'stderr': stderr, + } + + if detach: + result['exec_id'] = stdout.replace('\n', '') + + return result + + +def main(): + argument_spec = { + 'name': { + 'type': 'str', + 'required': True, + }, + 'command': { + 'type': 'str', + }, + 'argv': { + 'type': 'list', + 'elements': 'str', + }, + 'detach': { + 'type': 'bool', + 'default': False, + }, + 'env': { + 'type': 'dict', + }, + 'privileged': { + 'type': 'bool', + 'default': False, + }, + 'tty': { + 'type': 'bool', + 'default': False, + }, + 'user': { + 'type': 'str', + }, + 'workdir': { + 'type': 'str', + }, + } + + module = AnsibleModule( + argument_spec=argument_spec, + supports_check_mode=True, + required_one_of=[('argv', 'command')], + ) + + result = run_container_exec(module) + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/containers/podman/plugins/modules/podman_container_info.py b/ansible_collections/containers/podman/plugins/modules/podman_container_info.py index bbdd29fb9..dd361c449 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_container_info.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_container_info.py @@ -50,7 +50,7 @@ EXAMPLES = r""" RETURN = r""" containers: - description: Facts from all or specificed containers + description: Facts from all or specified containers returned: always type: list elements: dict diff --git a/ansible_collections/containers/podman/plugins/modules/podman_containers.py b/ansible_collections/containers/podman/plugins/modules/podman_containers.py index c67aee344..7f418a67b 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_containers.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_containers.py @@ -41,7 +41,7 @@ EXAMPLES = ''' - name: web image: nginx - name: test - image: python:3-alpine + image: python:3.10-alpine command: python -V ''' diff --git a/ansible_collections/containers/podman/plugins/modules/podman_export.py b/ansible_collections/containers/podman/plugins/modules/podman_export.py index e2bb19614..dda0099cb 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_export.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_export.py @@ -24,7 +24,10 @@ options: description: - Container to export. type: str - required: true + volume: + description: + - Volume to export. + type: str force: description: - Force saving to file even if it exists. @@ -48,6 +51,9 @@ EXAMPLES = ''' - containers.podman.podman_export: dest: /path/to/tar/file container: container-name +- containers.podman.podman_export: + dest: /path/to/tar/file + volume: volume-name ''' import os # noqa: E402 @@ -57,8 +63,16 @@ from ..module_utils.podman.common import remove_file_or_dir # noqa: E402 def export(module, executable): changed = False - command = [executable, 'export'] - command += ['-o=%s' % module.params['dest'], module.params['container']] + export_type = '' + command = [] + if module.params['container']: + export_type = 'container' + command = [executable, 'export'] + else: + export_type = 'volume' + command = [executable, 'volume', 'export'] + + command += ['-o=%s' % module.params['dest'], module.params[export_type]] if module.params['force']: dest = module.params['dest'] if os.path.exists(dest): @@ -75,8 +89,8 @@ def export(module, executable): return changed, '', '' rc, out, err = module.run_command(command) if rc != 0: - module.fail_json(msg="Error exporting container %s: %s" % ( - module.params['container'], err)) + module.fail_json(msg="Error exporting %s %s: %s" % (export_type, + module.params['container'], err)) return changed, out, err @@ -84,11 +98,18 @@ def main(): module = AnsibleModule( argument_spec=dict( dest=dict(type='str', required=True), - container=dict(type='str', required=True), + container=dict(type='str'), + volume=dict(type='str'), force=dict(type='bool', default=True), executable=dict(type='str', default='podman') ), supports_check_mode=True, + mutually_exclusive=[ + ('container', 'volume'), + ], + required_one_of=[ + ('container', 'volume'), + ], ) executable = module.get_bin_path(module.params['executable'], required=True) diff --git a/ansible_collections/containers/podman/plugins/modules/podman_generate_systemd.py b/ansible_collections/containers/podman/plugins/modules/podman_generate_systemd.py index 9c9bc7b27..486a18a86 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_generate_systemd.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_generate_systemd.py @@ -27,6 +27,12 @@ options: - Use C(/etc/systemd/system) for the system-wide systemd instance. - Use C(/etc/systemd/user) or C(~/.config/systemd/user) for use with per-user instances of systemd. type: path + force: + description: + - Replace the systemd unit file(s) even if it already exists. + - This works with dest option. + type: bool + default: false new: description: - Generate unit files that create containers and pods, not only start them. @@ -219,7 +225,7 @@ podman_command: import os from ansible.module_utils.basic import AnsibleModule import json - +from ansible_collections.containers.podman.plugins.module_utils.podman.common import compare_systemd_file_content RESTART_POLICY_CHOICES = [ 'no-restart', @@ -388,7 +394,7 @@ def generate_systemd(module): # In case of error in running the command if return_code != 0: - # Print informations about the error and return and empty dictionary + # Print information about the error and return and empty dictionary message = 'Error generating systemd .service unit(s).' message += ' Command executed: {command_str}' message += ' Command returned with code: {return_code}.' @@ -425,7 +431,7 @@ def generate_systemd(module): changed = True # If destination exist but not a directory if not os.path.isdir(systemd_units_dest): - # Stop and tell user that the destination is not a directry + # Stop and tell user that the destination is not a directory message = "Destination {systemd_units_dest} is not a directory." message += " Can't save systemd unit files in." module.fail_json( @@ -446,26 +452,13 @@ def generate_systemd(module): unit_file_name, ) - # See if we need to write the unit file, default yes - need_to_write_file = True - # If the unit file already exist, compare it with the - # generated content - if os.path.exists(unit_file_full_path): - # Read the file - with open(unit_file_full_path, 'r') as unit_file: - current_unit_file_content = unit_file.read() - # If current unit file content is the same as the - # generated content - # Remove comments from files, before comparing - current_unit_file_content_nocmnt = "\n".join([ - line for line in current_unit_file_content.splitlines() - if not line.startswith('#')]) - unit_content_nocmnt = "\n".join([ - line for line in unit_content.splitlines() - if not line.startswith('#')]) - if current_unit_file_content_nocmnt == unit_content_nocmnt: - # We don't need to write it - need_to_write_file = False + if module.params['force']: + # Force to replace the existing unit file + need_to_write_file = True + else: + # See if we need to write the unit file, default yes + need_to_write_file = bool(compare_systemd_file_content( + unit_file_full_path, unit_content)) # Write the file, if needed if need_to_write_file: @@ -506,6 +499,11 @@ def run_module(): 'required': False, 'default': False, }, + 'force': { + 'type': 'bool', + 'required': False, + 'default': False, + }, 'restart_policy': { 'type': 'str', 'required': False, diff --git a/ansible_collections/containers/podman/plugins/modules/podman_image.py b/ansible_collections/containers/podman/plugins/modules/podman_image.py index d66ff5d49..6305a5d5b 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_image.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_image.py @@ -17,7 +17,7 @@ DOCUMENTATION = r''' options: arch: description: - - CPU architecutre for the container image + - CPU architecture for the container image type: str name: description: @@ -132,6 +132,10 @@ DOCUMENTATION = r''' description: - Extra args to pass to build, if executed. Does not idempotently check for new build args. type: str + target: + description: + - Specify the target build stage to build. + type: str push_args: description: Arguments that control pushing images. type: dict @@ -512,6 +516,8 @@ class PodmanImageManager(object): if not self.module.check_mode: self.results['image'], output = self.push_image() self.results['stdout'] += "\n" + output + if image and not self.results.get('image'): + self.results['image'] = image def absent(self): image = self.find_image() @@ -536,12 +542,21 @@ class PodmanImageManager(object): image_name = self.image_name args = ['image', 'ls', image_name, '--format', 'json'] rc, images, err = self._run(args, ignore_errors=True) - images = json.loads(images) + try: + images = json.loads(images) + except json.decoder.JSONDecodeError: + self.module.fail_json(msg='Failed to parse JSON output from podman image ls: {out}'.format(out=images)) + if len(images) == 0: + # Let's find out if image exists + rc, out, err = self._run(['image', 'exists', image_name], ignore_errors=True) + if rc == 0: + inspect_json = self.inspect_image(image_name) + else: + return None if len(images) > 0: inspect_json = self.inspect_image(image_name) - if self._is_target_arch(inspect_json, self.arch) or not self.arch: - return images - + if self._is_target_arch(inspect_json, self.arch) or not self.arch: + return images or inspect_json return None def _is_target_arch(self, inspect_json=None, arch=None): @@ -565,7 +580,10 @@ class PodmanImageManager(object): image_name = self.image_name args = ['inspect', image_name, '--format', 'json'] rc, image_data, err = self._run(args) - image_data = json.loads(image_data) + try: + image_data = json.loads(image_data) + except json.decoder.JSONDecodeError: + self.module.fail_json(msg='Failed to parse JSON output from podman inspect: {out}'.format(out=image_data)) if len(image_data) > 0: return image_data else: @@ -656,6 +674,10 @@ class PodmanImageManager(object): if extra_args: args.extend(shlex.split(extra_args)) + target = self.build.get('target') + if target: + args.extend(['--target', target]) + args.append(self.path) rc, out, err = self._run(args, ignore_errors=True) @@ -812,6 +834,7 @@ def main(): rm=dict(type='bool', default=True), volume=dict(type='list', elements='str'), extra_args=dict(type='str'), + target=dict(type='str'), ), ), push_args=dict( diff --git a/ansible_collections/containers/podman/plugins/modules/podman_import.py b/ansible_collections/containers/podman/plugins/modules/podman_import.py index 5090b177c..6a408c08e 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_import.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_import.py @@ -29,6 +29,10 @@ options: - Set changes as list of key-value pairs, see example. type: list elements: dict + volume: + description: + - Volume to import, cannot be used with change and commit_message + type: str executable: description: - Path to C(podman) executable if it is not in the C($PATH) on the @@ -95,6 +99,9 @@ EXAMPLES = ''' - "CMD": /bin/bash - "User": root commit_message: "Importing image" +- containers.podman.podman_import: + src: /path/to/tar/file + volume: myvolume ''' import json # noqa: E402 @@ -128,25 +135,55 @@ def load(module, executable): return changed, out, err, info, command +def volume_load(module, executable): + changed = True + command = [executable, 'volume', 'import', module.params['volume'], module.params['src']] + src = module.params['src'] + if module.check_mode: + return changed, '', '', '', command + rc, out, err = module.run_command(command) + if rc != 0: + module.fail_json(msg="Error importing volume %s: %s" % (src, err)) + rc, out2, err2 = module.run_command([executable, 'volume', 'inspect', module.params['volume']]) + if rc != 0: + module.fail_json(msg="Volume %s inspection failed: %s" % (module.params['volume'], err2)) + try: + info = json.loads(out2)[0] + except Exception as e: + module.fail_json(msg="Could not parse JSON from volume %s: %s" % (module.params['volume'], e)) + return changed, out, err, info, command + + def main(): module = AnsibleModule( argument_spec=dict( src=dict(type='str', required=True), commit_message=dict(type='str'), change=dict(type='list', elements='dict'), - executable=dict(type='str', default='podman') + executable=dict(type='str', default='podman'), + volume=dict(type='str', required=False), ), + mutually_exclusive=[ + ('volume', 'commit_message'), + ('volume', 'change'), + ], supports_check_mode=True, ) executable = module.get_bin_path(module.params['executable'], required=True) - changed, out, err, image_info, command = load(module, executable) + volume_info = '' + image_info = '' + if module.params['volume']: + changed, out, err, volume_info, command = volume_load(module, executable) + else: + changed, out, err, image_info, command = load(module, executable) results = { "changed": changed, "stdout": out, "stderr": err, "image": image_info, + "volume": volume_info, "podman_command": " ".join(command) } diff --git a/ansible_collections/containers/podman/plugins/modules/podman_login.py b/ansible_collections/containers/podman/plugins/modules/podman_login.py index be417c761..8ae8418a9 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_login.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_login.py @@ -75,7 +75,7 @@ EXAMPLES = r""" username: user password: 'p4ssw0rd' -- name: Login to default registry and create ${XDG_RUNTIME_DIR}/containers/auth.json +- name: Login to quay.io and create ${XDG_RUNTIME_DIR}/containers/auth.json containers.podman.podman_login: username: user password: 'p4ssw0rd' diff --git a/ansible_collections/containers/podman/plugins/modules/podman_network.py b/ansible_collections/containers/podman/plugins/modules/podman_network.py index 846524b65..3f52af4ce 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_network.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_network.py @@ -37,10 +37,22 @@ options: description: - Driver to manage the network (default "bridge") type: str + force: + description: + - Remove all containers that use the network. + If the container is running, it is stopped and removed. + default: False + type: bool gateway: description: - IPv4 or IPv6 gateway for the subnet type: str + interface_name: + description: + - For bridge, it uses the bridge interface name. + For macvlan, it is the parent device on the host (it is the same + as 'opt.parent') + type: str internal: description: - Restrict external access from this network (default "false") @@ -92,7 +104,8 @@ options: required: false parent: description: - - The host device which should be used for the macvlan interface. + - The host device which should be used for the macvlan interface + (it is the same as 'interface' in that case). Defaults to the default route interface. type: str required: false @@ -219,14 +232,15 @@ class PodmanNetworkModuleParams: list -- list of byte strings for Popen command """ if self.action in ['delete']: - return self._simple_action() + return self._delete_action() if self.action in ['create']: return self._create_action() - def _simple_action(self): - if self.action == 'delete': - cmd = ['rm', '-f', self.params['name']] - return [to_bytes(i, errors='surrogate_or_strict') for i in cmd] + def _delete_action(self): + cmd = ['rm', self.params['name']] + if self.params['force']: + cmd += ['--force'] + return [to_bytes(i, errors='surrogate_or_strict') for i in cmd] def _create_action(self): cmd = [self.action, self.params['name']] @@ -270,6 +284,9 @@ class PodmanNetworkModuleParams: def addparam_macvlan(self, c): return c + ['--macvlan', self.params['macvlan']] + def addparam_interface_name(self, c): + return c + ['--interface-name', self.params['interface_name']] + def addparam_internal(self, c): return c + ['--internal=%s' % self.params['internal']] @@ -291,7 +308,6 @@ class PodmanNetworkDefaults: self.version = podman_version self.defaults = { 'driver': 'bridge', - 'disable_dns': False, 'internal': False, 'ipv6': False } @@ -334,6 +350,9 @@ class PodmanNetworkDiff: if LooseVersion(self.version) >= LooseVersion('4.0.0'): before = not self.info.get('dns_enabled', True) after = self.params['disable_dns'] + # compare only if set explicitly + if self.params['disable_dns'] is None: + after = before return self._diff_update_and_compare('disable_dns', before, after) before = after = self.params['disable_dns'] return self._diff_update_and_compare('disable_dns', before, after) @@ -642,7 +661,9 @@ def main(): name=dict(type='str', required=True), disable_dns=dict(type='bool', required=False), driver=dict(type='str', required=False), + force=dict(type='bool', default=False), gateway=dict(type='str', required=False), + interface_name=dict(type='str', required=False), internal=dict(type='bool', required=False), ip_range=dict(type='str', required=False), ipv6=dict(type='bool', required=False), diff --git a/ansible_collections/containers/podman/plugins/modules/podman_play.py b/ansible_collections/containers/podman/plugins/modules/podman_play.py index 04a30441b..10a9a06fa 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_play.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_play.py @@ -29,6 +29,12 @@ options: - Path to file with YAML configuration for a Pod. type: path required: True + annotation: + description: + - Add an annotation to the container or pod. + type: dict + aliases: + - annotations authfile: description: - Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json, @@ -37,6 +43,11 @@ options: Note - You can also override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. export REGISTRY_AUTH_FILE=path type: path + build: + description: + - Build images even if they are found in the local storage. + - It is required to exist subdirectories matching the image names to be build. + type: bool cert_dir: description: - Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. @@ -51,6 +62,11 @@ options: Kubernetes configmap YAMLs type: list elements: path + context_dir: + description: + - Use path as the build context directory for each image. + Requires build option be true. + type: path seccomp_profile_root: description: - Directory path for seccomp profiles (default is "/var/lib/kubelet/seccomp"). @@ -68,6 +84,28 @@ options: description: - Set logging driver for all created containers. type: str + log_opt: + description: + - Logging driver specific options. Set custom logging configuration. + type: dict + aliases: + - log_options + suboptions: + path: + description: + - specify a path to the log file (e.g. /var/log/container/mycontainer.json). + type: str + required: false + max_size: + description: + - Specify a max size of the log file (e.g 10mb). + type: str + required: false + tag: + description: + - specify a custom log tag for the container. This option is currently supported only by the journald log driver in Podman. + type: str + required: false log_level: description: - Set logging level for podman calls. Log messages above specified level @@ -128,6 +166,18 @@ EXAMPLES = ''' kube_file: ~/kube.yaml state: started +- name: Recreate pod from a kube file with options + containers.podman.podman_play: + kube_file: ~/kube.yaml + state: started + recreate: true + annotations: + greeting: hello + greet_to: world + userns: host + log_opt: + path: /tmp/my-container.log + max_size: 10mb ''' import re # noqa: F402 try: @@ -148,6 +198,9 @@ class PodmanKubeManagement: self.command = [self.executable, 'play', 'kube'] creds = [] # pod_name = extract_pod_name(module.params['kube_file']) + if self.module.params['annotation']: + for k, v in self.module.params['annotation'].items(): + self.command.extend(['--annotation', '"{k}={v}"'.format(k=k, v=v)]) if self.module.params['username']: creds += [self.module.params['username']] if self.module.params['password']: @@ -160,11 +213,16 @@ class PodmanKubeManagement: if self.module.params['configmap']: configmaps = ",".join(self.module.params['configmap']) self.command.extend(['--configmap=%s' % configmaps]) + if self.module.params['log_opt']: + for k, v in self.module.params['log_opt'].items(): + self.command.extend(['--log-opt', '{k}={v}'.format(k=k.replace('_', '-'), v=v)]) start = self.module.params['state'] == 'started' self.command.extend(['--start=%s' % str(start).lower()]) for arg, param in { '--authfile': 'authfile', + '--build': 'build', '--cert-dir': 'cert_dir', + '--context-dir': 'context_dir', '--log-driver': 'log_driver', '--seccomp-profile-root': 'seccomp_profile_root', '--tls-verify': 'tls_verify', @@ -264,15 +322,22 @@ class PodmanKubeManagement: def main(): module = AnsibleModule( argument_spec=dict( + annotation=dict(type='dict', aliases=['annotations']), executable=dict(type='str', default='podman'), kube_file=dict(type='path', required=True), authfile=dict(type='path'), + build=dict(type='bool'), cert_dir=dict(type='path'), configmap=dict(type='list', elements='path'), + context_dir=dict(type='path'), seccomp_profile_root=dict(type='path'), username=dict(type='str'), password=dict(type='str', no_log=True), log_driver=dict(type='str'), + log_opt=dict(type='dict', aliases=['log_options'], options=dict( + path=dict(type='str'), + max_size=dict(type='str'), + tag=dict(type='str'))), network=dict(type='list', elements='str'), state=dict( type='str', diff --git a/ansible_collections/containers/podman/plugins/modules/podman_pod.py b/ansible_collections/containers/podman/plugins/modules/podman_pod.py index ab475de99..7b57fd302 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_pod.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_pod.py @@ -42,6 +42,18 @@ options: type: list elements: str required: false + blkio_weight: + description: + - Block IO relative weight. The weight is a value between 10 and 1000. + - This option is not supported on cgroups V1 rootless systems. + type: str + required: false + blkio_weight_device: + description: + - Block IO relative device weight. + type: list + elements: str + required: false cgroup_parent: description: - Path to cgroups under which the cgroup for the pod will be created. If the path @@ -61,6 +73,16 @@ options: Unlike `cpus` this is of type string and parsed as a list of numbers. Format is 0-3,0,1 required: false type: str + cpuset_mems: + description: + - Memory nodes in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + required: false + type: str + cpu_shares: + description: + - CPU shares (relative weight). + required: false + type: str device: description: - Add a host device to the pod. Optional permissions parameter can be used to specify @@ -74,6 +96,12 @@ options: elements: str required: false type: list + device_write_bps: + description: + - Limit write rate (in bytes per second) to a device. + type: list + elements: str + required: false dns: description: - Set custom DNS servers in the /etc/resolv.conf file that will be shared between @@ -123,11 +151,21 @@ options: - 'on-watchdog' - 'on-abort' - 'always' - time: + restart_sec: + description: Set the systemd service restartsec value. + type: int + required: false + start_timeout: + description: Override the default start timeout for the container with the given value. + type: int + required: false + stop_timeout: description: - - Override the default stop timeout for the container with the given value. + - Override the default stop timeout for the container with the given value. Called `time` before version 4. type: int required: false + aliases: + - time no_header: description: - Do not generate the header including meta data such as the Podman version and the timestamp. @@ -242,6 +280,18 @@ options: - Set a static MAC address for the pod's shared network. type: str required: false + memory: + description: + - Set memory limit. + - A unit can be b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes). + type: str + required: false + memory_swap: + description: + - Set limit value equal to memory plus swap. + - A unit can be b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes). + type: str + required: false name: description: - Assign a name to the pod. diff --git a/ansible_collections/containers/podman/plugins/modules/podman_prune.py b/ansible_collections/containers/podman/plugins/modules/podman_prune.py index ee4c68a93..3fe3b7539 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_prune.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_prune.py @@ -66,17 +66,17 @@ options: type: dict system: description: - - Wheter to prune unused pods, containers, image, networks and volume data + - Whether to prune unused pods, containers, image, networks and volume data type: bool default: false system_all: description: - - Wheter to prune all unused images, not only dangling images. + - Whether to prune all unused images, not only dangling images. type: bool default: false system_volumes: description: - - Wheter to prune volumes currently unused by any container. + - Whether to prune volumes currently unused by any container. type: bool default: false volume: diff --git a/ansible_collections/containers/podman/plugins/modules/podman_runlabel.py b/ansible_collections/containers/podman/plugins/modules/podman_runlabel.py new file mode 100644 index 000000000..e5b6cf32f --- /dev/null +++ b/ansible_collections/containers/podman/plugins/modules/podman_runlabel.py @@ -0,0 +1,86 @@ +#!/usr/bin/python +# coding: utf-8 -*- + +# Copyright (c) 2023, Pavel Dostal <@pdostal> +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = r''' +module: podman_runlabel +short_description: Run given label from given image +author: Pavel Dostal (@pdostal) +description: + - podman container runlabel runs selected label from given image +options: + image: + description: + - Image to get the label from. + type: str + required: true + label: + description: + - Label to run. + type: str + required: true + executable: + description: + - Path to C(podman) executable if it is not in the C($PATH) on the + machine running C(podman) + default: 'podman' + type: str +requirements: + - "Podman installed on host" +''' + +RETURN = ''' +''' + +EXAMPLES = ''' +# What modules does for example +- containers.podman.podman_runlabel: + image: docker.io/continuumio/miniconda3 + label: INSTALL +''' + +from ansible.module_utils.basic import AnsibleModule # noqa: E402 + + +def runlabel(module, executable): + changed = False + command = [executable, 'container', 'runlabel'] + command.append(module.params['label']) + command.append(module.params['image']) + rc, out, err = module.run_command(command) + if rc == 0: + changed = True + else: + module.fail_json(msg="Error running the runlabel from image %s: %s" % ( + module.params['image'], err)) + return changed, out, err + + +def main(): + module = AnsibleModule( + argument_spec=dict( + image=dict(type='str', required=True), + label=dict(type='str', required=True), + executable=dict(type='str', default='podman') + ), + supports_check_mode=False, + ) + + executable = module.get_bin_path(module.params['executable'], required=True) + changed, out, err = runlabel(module, executable) + + results = { + "changed": changed, + "stdout": out, + "stderr": err + } + module.exit_json(**results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/containers/podman/plugins/modules/podman_save.py b/ansible_collections/containers/podman/plugins/modules/podman_save.py index bc7ce252c..e23f31021 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_save.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_save.py @@ -20,7 +20,8 @@ options: image: description: - Image to save. - type: str + type: list + elements: str required: true compress: description: @@ -70,9 +71,14 @@ RETURN = ''' EXAMPLES = ''' # What modules does for example - containers.podman.podman_save: - dest: /path/to/tar/file - compress: true - format: oci-dir + image: nginx + dest: /tmp/file123.tar +- containers.podman.podman_save: + image: + - nginx + - fedora + dest: /tmp/file456.tar + multi_image_archive: true ''' import os # noqa: E402 @@ -92,7 +98,8 @@ def save(module, executable): for param in module.params: if module.params[param] is not None and param in cmd_args: command += cmd_args[param] - command.append(module.params['image']) + for img in module.params['image']: + command.append(img) if module.params['force']: dest = module.params['dest'] if os.path.exists(dest): @@ -116,7 +123,7 @@ def save(module, executable): def main(): module = AnsibleModule( argument_spec=dict( - image=dict(type='str', required=True), + image=dict(type='list', elements='str', required=True), compress=dict(type='bool'), dest=dict(type='str', required=True, aliases=['path']), format=dict(type='str', choices=['docker-archive', 'oci-archive', 'oci-dir', 'docker-dir']), diff --git a/ansible_collections/containers/podman/plugins/modules/podman_secret.py b/ansible_collections/containers/podman/plugins/modules/podman_secret.py index fc8ec1f1d..a31aae9dc 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_secret.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_secret.py @@ -61,6 +61,15 @@ options: choices: - absent - present + labels: + description: + - Labels to set on the secret. + type: dict + debug: + description: + - Enable debug mode for module. + type: bool + default: False ''' EXAMPLES = r""" @@ -91,19 +100,75 @@ EXAMPLES = r""" """ from ansible.module_utils.basic import AnsibleModule +from ansible_collections.containers.podman.plugins.module_utils.podman.common import LooseVersion +from ansible_collections.containers.podman.plugins.module_utils.podman.common import get_podman_version +diff = {"before": '', "after": ''} -def podman_secret_create(module, executable, name, data, force, skip, - driver, driver_opts): - if force: - module.run_command([executable, 'secret', 'rm', name]) - if skip: + +def podman_secret_exists(module, executable, name, version): + if version is None or LooseVersion(version) < LooseVersion('4.5.0'): rc, out, err = module.run_command( [executable, 'secret', 'ls', "--format", "{{.Name}}"]) - if name in [i.strip() for i in out.splitlines()]: - return { - "changed": False, - } + return name in [i.strip() for i in out.splitlines()] + rc, out, err = module.run_command( + [executable, 'secret', 'exists', name]) + return rc == 0 + + +def need_update(module, executable, name, data, driver, driver_opts, debug, labels): + + cmd = [executable, 'secret', 'inspect', '--showsecret', name] + rc, out, err = module.run_command(cmd) + if rc != 0: + if debug: + module.log("PODMAN-SECRET-DEBUG: Unable to get secret info: %s" % err) + return True + try: + secret = module.from_json(out)[0] + # We support only file driver for now + if (driver and driver != 'file') or secret['Spec']['Driver']['Name'] != 'file': + if debug: + module.log("PODMAN-SECRET-DEBUG: Idempotency of driver %s is not supported" % driver) + return True + if secret['SecretData'] != data: + diff['after'] = "" + diff['before'] = "" + return True + if driver_opts: + for k, v in driver_opts.items(): + if secret['Spec']['Driver']['Options'].get(k) != v: + diff['after'] = "=".join([k, v]) + diff['before'] = "=".join( + [k, secret['Spec']['Driver']['Options'].get(k)]) + return True + if labels: + for k, v in labels.items(): + if secret['Spec']['Labels'].get(k) != v: + diff['after'] = "=".join([k, v]) + diff['before'] = "=".join( + [k, secret['Spec']['Labels'].get(k)]) + return True + except Exception: + return True + return False + + +def podman_secret_create(module, executable, name, data, force, skip, + driver, driver_opts, debug, labels): + podman_version = get_podman_version(module, fail=False) + if (podman_version is not None and + LooseVersion(podman_version) >= LooseVersion('4.7.0') + and (driver is None or driver == 'file')): + if not skip and need_update(module, executable, name, data, driver, driver_opts, debug, labels): + podman_secret_remove(module, executable, name) + else: + return {"changed": False} + else: + if force: + podman_secret_remove(module, executable, name) + if skip and podman_secret_exists(module, executable, name, podman_version): + return {"changed": False} cmd = [executable, 'secret', 'create'] if driver: @@ -112,6 +177,10 @@ def podman_secret_create(module, executable, name, data, force, skip, if driver_opts: cmd.append('--driver-opts') cmd.append(",".join("=".join(i) for i in driver_opts.items())) + if labels: + for k, v in labels.items(): + cmd.append('--label') + cmd.append("=".join([k, v])) cmd.append(name) cmd.append('-') @@ -121,6 +190,10 @@ def podman_secret_create(module, executable, name, data, force, skip, return { "changed": True, + "diff": { + "before": diff['before'] + "\n", + "after": diff['after'] + "\n", + }, } @@ -150,6 +223,8 @@ def main(): skip_existing=dict(type='bool', default=False), driver=dict(type='str'), driver_opts=dict(type='dict'), + labels=dict(type='dict'), + debug=dict(type='bool', default=False), ), ) @@ -165,9 +240,11 @@ def main(): skip = module.params['skip_existing'] driver = module.params['driver'] driver_opts = module.params['driver_opts'] + debug = module.params['debug'] + labels = module.params['labels'] results = podman_secret_create(module, executable, name, data, force, skip, - driver, driver_opts) + driver, driver_opts, debug, labels) else: results = podman_secret_remove(module, executable, name) diff --git a/ansible_collections/containers/podman/plugins/modules/podman_secret_info.py b/ansible_collections/containers/podman/plugins/modules/podman_secret_info.py new file mode 100644 index 000000000..ebe854241 --- /dev/null +++ b/ansible_collections/containers/podman/plugins/modules/podman_secret_info.py @@ -0,0 +1,121 @@ +#!/usr/bin/python +# Copyright (c) 2024 Red Hat +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +DOCUMENTATION = r''' +module: podman_secret_info +author: + - "Sagi Shnaidman (@sshnaidm)" +short_description: Gather info about podman secrets +notes: [] +description: + - Gather info about podman secrets with podman inspect command. +requirements: + - "Podman installed on host" +options: + name: + description: + - Name of the secret + type: str + showsecret: + description: + - Show secret data value + type: bool + default: False + executable: + description: + - Path to C(podman) executable if it is not in the C($PATH) on the + machine running C(podman) + default: 'podman' + type: str +''' + +EXAMPLES = r""" +- name: Gather info about all present secrets + podman_secret_info: + +- name: Gather info about specific secret + podman_secret_info: + name: specific_secret +""" + +RETURN = r""" +secrets: + description: Facts from all or specified secrets + returned: always + type: list + sample: [ + { + "ID": "06068c676e9a7f1c7dc0da8dd", + "CreatedAt": "2024-01-28T20:32:08.31857841+02:00", + "UpdatedAt": "2024-01-28T20:32:08.31857841+02:00", + "Spec": { + "Name": "secret_name", + "Driver": { + "Name": "file", + "Options": { + "path": "/home/user/.local/share/containers/storage/secrets/filedriver" + } + }, + "Labels": {} + } + } + ] +""" + +import json +from ansible.module_utils.basic import AnsibleModule + + +def get_secret_info(module, executable, show, name): + command = [executable, 'secret', 'inspect'] + if show: + command.append('--showsecret') + if name: + command.append(name) + else: + all_names = [executable, 'secret', 'ls', '-q'] + rc, out, err = module.run_command(all_names) + name = out.split() + if not name: + return [], out, err + command.extend(name) + rc, out, err = module.run_command(command) + if rc != 0 or 'no secret with name or id' in err: + module.fail_json(msg="Unable to gather info for %s: %s" % (name or 'all secrets', err)) + if not out or json.loads(out) is None: + return [], out, err + return json.loads(out), out, err + + +def main(): + module = AnsibleModule( + argument_spec=dict( + executable=dict(type='str', default='podman'), + name=dict(type='str'), + showsecret=dict(type='bool', default=False), + ), + supports_check_mode=True, + ) + + name = module.params['name'] + showsecret = module.params['showsecret'] + executable = module.get_bin_path(module.params['executable'], required=True) + + inspect_results, out, err = get_secret_info(module, executable, showsecret, name) + + results = { + "changed": False, + "secrets": inspect_results, + "stderr": err, + } + + module.exit_json(**results) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/containers/podman/plugins/modules/podman_volume.py b/ansible_collections/containers/podman/plugins/modules/podman_volume.py index c533091e1..b4d5062fa 100644 --- a/ansible_collections/containers/podman/plugins/modules/podman_volume.py +++ b/ansible_collections/containers/podman/plugins/modules/podman_volume.py @@ -327,7 +327,13 @@ class PodmanVolume: # pylint: disable=unused-variable rc, out, err = self.module.run_command( [self.module.params['executable'], b'volume', b'inspect', self.name]) - return json.loads(out)[0] if rc == 0 else {} + if rc == 0: + data = json.loads(out) + if data: + data = data[0] + if data.get("Name") == self.name: + return data + return {} def _get_podman_version(self): # pylint: disable=unused-variable diff --git a/ansible_collections/containers/podman/tests/integration/targets/connection_podman/test_connection.inventory b/ansible_collections/containers/podman/tests/integration/targets/connection_podman/test_connection.inventory index c64c399f6..31bce66bd 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/connection_podman/test_connection.inventory +++ b/ansible_collections/containers/podman/tests/integration/targets/connection_podman/test_connection.inventory @@ -3,8 +3,8 @@ podman-container [podman:vars] # 1. install podman # 2. create container: -# podman pull python:3-alpine -# podman run -d --name podman-container python:3-alpine sleep 999999 +# podman pull python:3.10-alpine +# podman run -d --name podman-container python:3.10-alpine sleep 999999 # 3. run test: # ./bin/ansible-test integration connection_podman # 6. remove container diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_container/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_container/tasks/main.yml index 3a66f6a82..a6fd44083 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_container/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_container/tasks/main.yml @@ -1,5 +1,20 @@ - name: Test podman_container block: + + - name: Discover podman version + shell: podman version | grep "^Version:" | awk {'print $2'} + register: podman_v + + - name: Set podman version to 3 + set_fact: + podman_version: 3 + when: podman_v.stdout is version('4.0.0', 'lt') + + - name: Set podman version to 4 + set_fact: + podman_version: 4 + when: podman_v.stdout is version('4.0.0', '>=') + - name: Delete all container leftovers from tests containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" @@ -220,6 +235,26 @@ fail_msg: "Creating stopped container test failed!" success_msg: "Creating stopped container test passed!" + - name: Force recreate stopped container + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + image: alpine:3.7 + state: started + command: sleep 1d + recreate: true + register: recreate_stopped + + - name: Check output is correct + assert: + that: + - recreate_stopped is changed + - recreate_stopped.container is defined + - recreate_stopped.container['State']['Running']|bool + - "'recreated container' in recreate_stopped.actions" + fail_msg: Force recreate stopped test failed! + success_msg: Force recreate stopped test passed! + - name: Delete created container containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" @@ -348,6 +383,48 @@ fail_msg: Deleting started container test failed! success_msg: Deleting started container test passed! + - name: Create container with security_opt + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + image: docker.io/alpine:3.7 + state: started + command: sleep 1d + security_opt: + - label=level:s0 + - label=type:spc_t + - label=filetype:container_share_t + - seccomp=unconfined + + - name: Recreate container with same security_opt flags + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + image: docker.io/alpine:3.7 + state: started + command: sleep 1d + security_opt: + - label=level:s0 + - label=type:spc_t + - label=filetype:container_share_t + - seccomp=unconfined + register: recreate_security_opt + + - name: Check if output is correct + assert: + that: + - recreate_security_opt is not changed + - recreate_security_opt.container is defined + - recreate_security_opt.container != {} + - recreate_security_opt.container['State']['Running'] + - "'recreated container' not in recreate_security_opt.actions" + + - name: Remove container + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + state: absent + - name: Recreate container with parameters containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" @@ -533,7 +610,7 @@ - name: Check podman_actions assert: that: - - "'podman rm -f testidem' in remove.podman_actions" + - "'podman rm --force testidem' in remove.podman_actions" # - name: Create a pod # shell: podman pod create --name testidempod @@ -580,7 +657,7 @@ - idem4.podman_systemd.keys() | list | length > 0 - idem4.podman_systemd.values() | list | length > 0 - - name: Run container with systemd generation parameters + - name: Run container with systemd generation parameters v4 containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" name: container1 @@ -590,30 +667,65 @@ generate_systemd: path: /tmp/ restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system14 + when: podman_version == 4 + + - name: Run container with systemd generation parameters v3 + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine + state: started + command: sleep 20m + generate_systemd: + path: /tmp/ time: 120 + restart_policy: always no_header: true names: true pod_prefix: whocares separator: zzzz container_prefix: contain - register: system1 + register: system13 + when: podman_version == 3 - name: Check service file presents stat: path: /tmp/containzzzzcontainer1.service register: service_file - - name: Check that container has correct systemd output + - name: Check that container has correct systemd output v4 + assert: + that: + - system14.podman_systemd.keys() | list | first == 'containzzzzcontainer1' + - system14.podman_systemd.values() | list | length > 0 + - service_file.stat.exists | bool + - "'Restart=always' in system14.podman_systemd.values() | list | first" + - "'autogenerated by Podman' not in system14.podman_systemd.values() | list | first" + - "'RestartSec=10' in system14.podman_systemd.values() | list | first" + - "'TimeoutStartSec=20' in system14.podman_systemd.values() | list | first" + when: podman_version == 4 + + - name: Check that container has correct systemd output v3 assert: that: - - system1.podman_systemd.keys() | list | first == 'containzzzzcontainer1' - - system1.podman_systemd.values() | list | length > 0 + - system13.podman_systemd.keys() | list | first == 'containzzzzcontainer1' + - system13.podman_systemd.values() | list | length > 0 - service_file.stat.exists | bool - - "'-t 120 container1' in system1.podman_systemd.values() | list | first" - - "'Restart=always' in system1.podman_systemd.values() | list | first" - - "'autogenerated by Podman' not in system1.podman_systemd.values() | list | first" + - "'Restart=always' in system13.podman_systemd.values() | list | first" + - "'autogenerated by Podman' not in system13.podman_systemd.values() | list | first" + - "'-t 120 ' in system13.podman_systemd.values() | list | first" + when: podman_version == 3 - - name: Delete container with systemd generation parameters + - name: Delete container with systemd generation parameters v3 containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" name: container1 @@ -622,14 +734,36 @@ command: sleep 20m generate_systemd: path: /tmp/ - restart_policy: always time: 120 + restart_policy: always no_header: true names: true pod_prefix: whocares separator: zzzz container_prefix: contain register: system1 + when: podman_version == 3 + + - name: Delete container with systemd generation parameters v4 + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine + state: absent + command: sleep 20m + generate_systemd: + path: /tmp/ + restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system1 + when: podman_version == 4 - name: Check service file doesn't present stat: @@ -641,6 +775,71 @@ that: - not service2_file.stat.exists | bool + - name: Create environment variables files + copy: + dest: /tmp/envfile + content: | + FOO=bar + BAR=foo + TEST=1 + BOOL=false + + - name: Create another environment variables files + copy: + dest: /tmp/envfile2 + content: | + TESTVAR=qwerty + + - name: Create container with environment variables file + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine + state: started + command: + - sh + - -c + - echo $BAR + attach: + - stdout + - stderr + env_file: /tmp/envfile + register: envfile + + - name: Check output is correct for env file + assert: + that: + - envfile.stdout == "foo\n" + + - name: Create container with multiple environment variables files + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine + state: started + command: + - sh + - -c + - echo $TESTVAR + attach: + - stdout + - stderr + env_file: + - /tmp/envfile + - /tmp/envfile2 + register: envfile2 + + - name: Check output is correct for multiple env files + assert: + that: + - envfile2.stdout == "qwerty\n" + + - name: Delete container with environment variables file + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: absent + - name: Create temporary rootfs directory ansible.builtin.tempfile: state: directory @@ -700,7 +899,7 @@ - image.container is defined - image.container['State']['Running'] - image.container['Image'] == "" - - image.container['Rootfs'] == "{{ container_tempdir.path }}" + - image.container['Rootfs'] == container_tempdir.path - "'started container3' in image.actions" fail_msg: Rootfs container test failed! success_msg: Rootfs container test passed! @@ -762,11 +961,120 @@ - image.container is defined - image.container['State']['Running'] - image.container['Image'] == "" - - image.container['Rootfs'] == "{{ container_tempdir.path }}" + - image.container['Rootfs'] == container_tempdir.path - "'recreated container3' in image.actions" fail_msg: Rootfs container test failed! success_msg: Rootfs container test passed! + - name: Run started container with attaching + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine:3.7 + state: started + command: ls /nonexists + attach: + - stdout + - stderr + register: attach + ignore_errors: true + + - name: Check output is correct for started container with attaching + assert: + that: + - attach is failed + - "'No such file or directory' in attach.stderr" + + - name: Delete container with attaching + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: absent + + - name: Create container with attaching in created state + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine:3.7 + state: created + command: ls /nonexists + attach: + - stdout + - stderr + + - name: Start container with attaching from created state + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: started + attach: + - stdout + - stderr + register: attach2 + ignore_errors: true + + - name: Check output is correct for started container with attaching from created state + assert: + that: + - attach2 is failed + - "'No such file or directory' in attach2.stderr" + + - name: Delete container with attaching from created state + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: absent + + - name: Create container without attaching in created state + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine:3.7 + state: created + command: ls /nonexists + + - name: Start container without attaching from created state + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: started + register: attach21 + + - name: Check output is correct for container without attaching from created state + assert: + that: + - attach21 is success + + - name: Delete container without attaching from created state + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: absent + + - name: Create container with detach False + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + image: alpine:3.7 + state: created + command: ls /nonexists + detach: false + + - name: Start container with detach False + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container1 + state: started + detach: false + register: attach3 + ignore_errors: true + + - name: Check output is correct for started container with detach False + assert: + that: + - attach3 is failed + - "'No such file or directory' in attach3.stderr" + always: - name: Remove container diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_container_exec/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_container_exec/tasks/main.yml new file mode 100644 index 000000000..2d2874325 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_container_exec/tasks/main.yml @@ -0,0 +1,67 @@ +- name: Test podman_container_exec + block: + - name: Generate random value for container name + set_fact: + container_name: "{{ 'ansible-test-podman-%0x' % ((2**32) | random) }}" + + - name: Make sure container doesn't exist + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: "{{ container_name }}" + state: absent + + - name: Test exec when the container doesn't exist + containers.podman.podman_container_exec: + name: "{{ container_name }}" + command: "cat /etc/redhat-release" + ignore_errors: true + register: no_container + + - name: Create and start a container for testing + containers.podman.podman_container: + name: "{{ container_name }}" + image: registry.access.redhat.com/ubi8 + command: sleep 1d + state: started + + - name: Test exec with command and workdir options + containers.podman.podman_container_exec: + name: "{{ container_name }}" + command: "cat redhat-release" + workdir: /etc + register: exec1 + + - name: Test exec with argv and env options + containers.podman.podman_container_exec: + name: "{{ container_name }}" + argv: + - /bin/sh + - -c + - echo $HELLO $BYE + env: + HELLO: hello world + BYE: goodbye world + register: exec2 + + - name: Test exec with detach option + containers.podman.podman_container_exec: + name: "{{ container_name }}" + command: "cat redhat-release" + detach: true + register: exec3 + + - name: Check if the result is as expected + assert: + that: + - no_container is failed + - "'Red Hat Enterprise Linux' in exec1.stdout" + - "'hello world' in exec2.stdout" + - "'goodbye world' in exec2.stdout" + - exec3.exec_id is defined + + always: + - name: Cleanup + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: "{{ container_name }}" + state: absent diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_all.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_all.yml index 48247d71f..023878349 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_all.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_all.yml @@ -332,6 +332,63 @@ assert: that: test25 is changed +- name: Run container for linking with PID + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency + state: present + register: test26 + +- name: Check info with PID + assert: + that: test26 is not changed + +- name: Run second container for linking with PID + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency2 + state: present + pid: "container:idempotency" + register: test27 + +- name: Check info of second container with PID + assert: + that: test27 is changed + +- name: Run second container for linking with PID + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency2 + state: present + pid: "container:idempotency" + register: test28 + +- name: Check info of second container with PID again + assert: + that: test28 is not changed + +- name: Run second container for linking with PID with container ID + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency2 + state: present + pid: "container:{{ test26.container.Id }}" + register: test29 + +- name: Check info of second container with PID of container ID again + assert: + that: test29 is not changed + +- name: Remove dependent test container + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: idempotency2 + state: absent + - name: Remove test container containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml index 54a667c86..81b7baf06 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_ports.yml @@ -40,6 +40,7 @@ - "127.0.0.1:43423:8872" - "127.0.0.2:43423:8872/tcp" - "127.0.0.3:43423:8872" + - "0.0.0.0:15674:7846" register: test2 - name: check test2 @@ -63,6 +64,7 @@ - "127.0.0.1:43423:8872" - "127.0.0.2:43423:8872/tcp" - "127.0.0.3:43423:8872" + - "0.0.0.0:15674:7846" register: test3 - name: check test3 diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_systemd.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_systemd.yml new file mode 100644 index 000000000..86e8097db --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/idem_systemd.yml @@ -0,0 +1,133 @@ +# Systemd generation +- containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: idempotency + state: absent + +- containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency + state: started + command: 1h + generate_systemd: + path: /tmp/ + restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system0 + +- name: Check if the result is changed + assert: + that: + - system0 is changed + +- containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency + state: started + command: 1h + generate_systemd: + path: /tmp/ + restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system1 + +- name: Check if the result is not changed + assert: + that: + - system1 is not changed + +- name: Remove the systemd unit file + ansible.builtin.file: + path: /tmp/containzzzzidempotency.service + state: absent + +- containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency + state: started + command: 1h + generate_systemd: + path: /tmp/ + restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system2 + +- name: Check if the result is changed + assert: + that: + - system2 is changed + +- containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency + state: started + command: 1h + generate_systemd: + path: /tmp/ + restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system3 + +- name: Check if the result is not changed + assert: + that: + - system3 is not changed + +- name: Add string to change the systemd unit file + ansible.builtin.shell: echo 'test=onetwo' >> /tmp/containzzzzidempotency.service + +- containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + image: "{{ idem_image }}" + name: idempotency + state: started + command: 1h + generate_systemd: + path: /tmp/ + restart_policy: always + no_header: true + names: true + pod_prefix: whocares + separator: zzzz + container_prefix: contain + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 + register: system4 + +- name: Check if the result is changed + assert: + that: + - system4 is changed diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/main.yml index 0b538ad85..3d3654aea 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_container_idempotency/tasks/main.yml @@ -23,6 +23,9 @@ - name: Test idempotency of containers in pods include_tasks: idem_pods.yml +- name: Test idempotency of systemd generation + include_tasks: idem_systemd.yml + - name: Test idempotency of other settings include_tasks: idem_all.yml diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_containers/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_containers/tasks/main.yml index 69c94b313..9eabd500c 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_containers/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_containers/tasks/main.yml @@ -612,7 +612,7 @@ - name: Check podman_actions assert: that: - - "'podman rm -f testidem' in remove.podman_actions" + - "'podman rm --force testidem' in remove.podman_actions" - name: Create a pod containers.podman.podman_pod: diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_export/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_export/tasks/main.yml index 70f8d3852..39ac61faa 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_export/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_export/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Test podman export +- name: Test podman container export block: - name: Start container containers.podman.podman_container: @@ -69,3 +69,83 @@ executable: "{{ test_executable | default('podman') }}" name: container state: absent + +- name: Test podman volume export + block: + - name: Start container + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + image: alpine:3.7 + state: started + volume: + - "volume:/test" + command: sleep 1d + + - name: Export volume + containers.podman.podman_export: + executable: "{{ test_executable | default('podman') }}" + volume: volume + dest: /tmp/volume + + - name: Check file + stat: + path: /tmp/volume + register: vlm + + - name: Check it's exported + assert: + that: + - vlm.stat.exists + + - name: Import volume + containers.podman.podman_import: + executable: "{{ test_executable | default('podman') }}" + src: /tmp/volume + volume: "volume" + register: volume + + - name: Check it's imported + assert: + that: + - volume is success + + - name: Export volume without force + containers.podman.podman_export: + executable: "{{ test_executable | default('podman') }}" + volume: volume + dest: /tmp/volume + force: false + register: volume2 + + - name: Check it's exported + assert: + that: + - volume2 is success + - volume2 is not changed + + - name: Export volume with force + containers.podman.podman_export: + executable: "{{ test_executable | default('podman') }}" + volume: volume + dest: /tmp/volume + force: true + register: volume3 + + - name: Check it's not exported + assert: + that: + - volume3 is changed + + always: + - name: Remove container + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + state: absent + + - name: Remove volume + containers.podman.podman_volume: + executable: "{{ test_executable | default('podman') }}" + name: test_volume + state: absent diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_generate_systemd/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_generate_systemd/tasks/main.yml index 6b0d18cb2..1e48a11dc 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_generate_systemd/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_generate_systemd/tasks/main.yml @@ -39,6 +39,48 @@ path: "/tmp/podman_generate_systemd/{{ item.key }}.service" loop: "{{ postgres_local_systemd_unit.systemd_units | dict2items }}" +- name: Try to create a systemd unit file on the same path + containers.podman.podman_generate_systemd: + name: postgres_local + dest: /tmp/podman_generate_systemd + register: generate1 + +- name: Check the unit files exists + ansible.builtin.stat: + path: "/tmp/podman_generate_systemd/{{ item.key }}.service" + loop: "{{ generate1.systemd_units | dict2items }}" + register: unitfile1 + +- name: Get checksum value + set_fact: + checksum1: "{{ item.stat.checksum }}" + with_items: "{{ unitfile1.results }}" + +- name: Force to create a systemd unit file on the same path + containers.podman.podman_generate_systemd: + name: postgres_local + dest: /tmp/podman_generate_systemd + force: true + register: generate2 + +- name: Check the unit files exists again + ansible.builtin.stat: + path: "/tmp/podman_generate_systemd/{{ item.key }}.service" + loop: "{{ generate2.systemd_units | dict2items }}" + register: unitfile2 + +- name: Get checksum value again + set_fact: + checksum2: "{{ item.stat.checksum }}" + with_items: "{{ unitfile2.results }}" + +- name: Check if the systemd unit files are as expected + assert: + that: + - generate1 is not changed + - generate2 is changed + - checksum1 != checksum2 + - name: Regenerate the systemd units with all the options containers.podman.podman_generate_systemd: name: postgres_local diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_image/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_image/tasks/main.yml index 645d0a033..0db4c050c 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_image/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_image/tasks/main.yml @@ -1,5 +1,18 @@ - name: Test podman_image block: + - name: List all images on host before test + containers.podman.podman_image_info: + + - name: Remove images for test + containers.podman.podman_image: + name: "{{ item }}" + state: absent + loop: + - quay.io/coreos/alpine-sh + - docker.io/alpine + - docker.io/library/ubuntu + - docker.io/library/alpine + - name: Pull image containers.podman.podman_image: executable: "{{ test_executable | default('podman') }}" @@ -47,7 +60,7 @@ - pull1.podman_actions is defined - pull2 is not changed - pull3 is changed - - pull4 is changed + - pull4 is not changed - pull5 is not changed - pull6 is changed - "'alpine-sh' in images.stdout" @@ -83,14 +96,14 @@ state: absent register: rmi3 - - name: Try to remove docker.io image using short url + - name: Remove docker.io image using short url containers.podman.podman_image: executable: "{{ test_executable | default('podman') }}" name: docker.io/alpine state: absent register: rmi4 - - name: Remove docker.io image using normalised url + - name: Try to remove docker.io image using normalised url containers.podman.podman_image: executable: "{{ test_executable | default('podman') }}" name: docker.io/library/alpine @@ -121,8 +134,8 @@ - rmi1 is changed - rmi2 is not changed - rmi3 is changed - - rmi4 is not changed - - rmi5 is changed + - rmi4 is changed + - rmi5 is not changed - rmi6 is changed - "'alpine-sh' not in images.stdout" - "'library/ubuntu' not in images.stdout" diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_image_info/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_image_info/tasks/main.yml index 105ffcd1f..adbd49478 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_image_info/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_image_info/tasks/main.yml @@ -39,7 +39,7 @@ containers.podman.podman_image_info: executable: "{{ test_executable | default('podman') }}" name: nope - register: single_nonexistant + register: single_nonexistent - name: Get info on multiple images that do not exist containers.podman.podman_image_info: @@ -47,7 +47,7 @@ name: - nope - reallynope - register: multiple_nonexistant + register: multiple_nonexistent - name: Get info with one image that does not exist containers.podman.podman_image_info: @@ -56,11 +56,11 @@ - dnsmasq - nope - etcd - register: mixed_nonexistant + register: mixed_nonexistent - - name: Ensure image info was returned when non-existant image info was requisted + - name: Ensure image info was returned when non-existent image info was requisted assert: that: - - single_nonexistant.images | length == 0 - - multiple_nonexistant.images | length == 0 - - mixed_nonexistant.images | length == 2 + - single_nonexistent.images | length == 0 + - multiple_nonexistent.images | length == 0 + - mixed_nonexistent.images | length == 2 diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_import/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_import/tasks/main.yml index db8254e87..9ec11339d 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_import/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_import/tasks/main.yml @@ -64,9 +64,86 @@ - test2.image.User == 'someuser' - test2.image["Config"]["Cmd"][2] == "/bin/nonsh" +- name: Test podman volume import + block: + - name: Start container + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + image: alpine:3.7 + state: started + volume: + - "volume:/test" + command: touch /test/test_file + + - name: Export volume + containers.podman.podman_export: + executable: "{{ test_executable | default('podman') }}" + volume: volume + dest: /tmp/volume + + - name: Check file + stat: + path: /tmp/volume + register: vlm + + - name: Check it's exported + assert: + that: + - vlm.stat.exists + + - name: delete container + containers.podman.podman_container: + state: absent + name: container + + - name: delete volume + containers.podman.podman_volume: + state: absent + name: volume + + # podman needs a volume to exist before import + - name: creating volume before importing + containers.podman.podman_volume: + name: volume + state: present + + - name: Import volume + containers.podman.podman_import: + executable: "{{ test_executable | default('podman') }}" + src: /tmp/volume + volume: "volume" + register: volume + + - name: Check it's imported + assert: + that: + - volume is success + + - name: Check file is there + containers.podman.podman_container: + executable: "{{ test_executable | default('podman') }}" + name: container + image: alpine:3.7 + state: started + volume: + - "volume:/test" + command: ls /test/test_file + register: ls + + - name: Check it's imported + assert: + that: + - ls is success + always: - name: Remove container containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" name: container state: absent + - name: Remove volume + containers.podman.podman_volume: + executable: "{{ test_executable | default('podman') }}" + name: volume + state: absent diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/Containerfile b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/Containerfile new file mode 100644 index 000000000..2530caed7 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/Containerfile @@ -0,0 +1,3 @@ +FROM ubi8-init +RUN dnf -y install httpd; dnf -y clean all +RUN systemctl enable httpd.service \ No newline at end of file diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/kube-buil-test.yaml b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/kube-buil-test.yaml new file mode 100644 index 000000000..3ccd0ca88 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/kube-buil-test.yaml @@ -0,0 +1,21 @@ +# Save the output of this file and use kubectl create -f to import +# it into Kubernetes. +# +# Created with podman-4.4.1 +apiVersion: v1 +kind: Pod +metadata: + annotations: + org.opencontainers.image.base.digest/buil-test: sha256:e08f47885d5794a7d8b6404e9db9b0c0a9fc6c633da3c3af0c355299 + org.opencontainers.image.base.name/buil-test: registry.redhat.io/ubi8-init:latest + creationTimestamp: "2023-09-28T01:12:34Z" + labels: + app: buil-test-pod + name: buil-test-pod +spec: + containers: + - image: localhost/build-test:latest + name: buil-test + ports: + - containerPort: 80 + hostPort: 8080 diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/play-pod.yaml b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/play-pod.yaml new file mode 100644 index 000000000..e238bcc79 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/files/play-pod.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Pod +metadata: + name: web-deploy + labels: + app: webapp +spec: + containers: + - name: alpinex + image: alpine + command: ['sleep', '1d'] + - name: alpiney + image: alpine + command: ['sleep', '1d'] \ No newline at end of file diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/main.yml index 30f53fa5f..ae9d8572b 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/main.yml @@ -128,3 +128,21 @@ args: apply: become: true + +- name: Test play kube with on-demand image build + include_tasks: play-with-build.yml + vars: + ansible_python_interpreter: "/usr/bin/python" + +- name: Test play kube options + include_tasks: play-with-options.yml + vars: + ansible_python_interpreter: "/usr/bin/python" + target_pod: web-deploy + target_container: web-deploy-alpinex + log_opt: + path: /tmp/mycontainer.json + size: 10mb + userns: host + kube_dir: /tmp + kube_file: play-pod.yaml \ No newline at end of file diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-build.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-build.yml new file mode 100644 index 000000000..e7601f531 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-build.yml @@ -0,0 +1,51 @@ +--- +- name: Test play kube with on-demand image build + vars: + image_name: build-test + build_context_dir: /tmp/contextdir + kube_dir: /tmp + success_msg: "Successfully tagged localhost/{{ image_name }}:latest" + block: + + - name: Make sure that {{ image_name }} image is absent + containers.podman.podman_image: + name: "{{ image_name }}" + state: absent + + - name: Copy files to known place + copy: + src: kube-buil-test.yaml + dest: "{{ kube_dir }}/kube-buil-test.yaml" + remote_src: false + + - name: Create context dir for build + file: + path: "{{ build_context_dir }}/{{ image_name }}" + state: directory + + - name: Copy Containerfile for build + copy: + src: Containerfile + dest: "{{ build_context_dir }}/{{ image_name }}/Containerfile" + remote_src: false + + - name: Play kube file with image build + containers.podman.podman_play: + kube_file: "{{ kube_dir }}/kube-buil-test.yaml" + build: true + context_dir: "{{ build_context_dir }}" + state: started + register: play_with_build + + - name: Check if the result is changed + assert: + that: + - play_with_build is changed + - success_msg in play_with_build.stdout + + always: + + - name: Cleanup pods + containers.podman.podman_play: + kube_file: "{{ kube_dir }}/kube-buil-test.yaml" + state: absent diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-options.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-options.yml new file mode 100644 index 000000000..aeb79a5bc --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_play/tasks/play-with-options.yml @@ -0,0 +1,52 @@ +--- +- name: Test play pod with options + block: + - name: Copy kube file + copy: + src: "{{ kube_file }}" + dest: "{{ kube_dir }}/{{ kube_file }}" + remote_src: false + + - name: Create Pod with many options + containers.podman.podman_play: + kube_file: "{{ kube_dir }}/{{ kube_file }}" + state: started + recreate: true + annotation: + greeting: hello + greet_to: world + userns: "{{ userns }}" + log_opt: + path: "{{ log_opt.path }}" + max_size: "{{ log_opt.size }}" + register: play_pod + + - name: Get pod info + containers.podman.podman_pod_info: + name: "{{ target_pod }}" + register: play_pod_info + + - name: Check userns is set in Pod + assert: + that: + - play_pod_info.pods.0.InfraConfig.userns == userns + + - name: Get container info + containers.podman.podman_container_info: + name: "{{ target_container }}" + register: play_container_info + + - name: Check annotations and log options are set in Pod + assert: + that: + - play_container_info.containers.0.Config.Annotations["greeting"] == "hello" + - play_container_info.containers.0.Config.Annotations["greet_to"] == "world" + - play_container_info.containers.0.HostConfig.LogConfig["Path"] == log_opt.path + - play_container_info.containers.0.HostConfig.LogConfig["Size"] | lower == log_opt.size + + always: + + - name: Cleanup pods + containers.podman.podman_play: + kube_file: "{{ kube_dir }}/{{ kube_file }}" + state: absent diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/main.yml index 491d4a8a8..abee17596 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/main.yml @@ -333,7 +333,7 @@ that: - pod15_a_info is changed - - name: Start pod with share for idempotency + - name: Start pod with gidmap and uidmap for idempotency containers.podman.podman_pod: executable: "{{ test_executable | default('podman') }}" name: pod1 @@ -347,6 +347,47 @@ that: - pod15_b_info is not changed + # Reset the namespace check. + # This is because changing from `uidmap/gidmap` to `userns` does not + # report a difference currently + - name: Start pod without uidmap to reset + containers.podman.podman_pod: + executable: "{{ test_executable | default('podman') }}" + name: pod1 + state: created + register: pod15_c_info + + - name: Check info + assert: + that: + - pod15_c_info is changed + + - name: Start pod with userns + containers.podman.podman_pod: + executable: "{{ test_executable | default('podman') }}" + name: pod1 + userns: auto + state: created + register: pod_userns_a_info + + - name: Check info + assert: + that: + - pod_userns_a_info is changed + + - name: Start pod with userns for idempotency + containers.podman.podman_pod: + executable: "{{ test_executable | default('podman') }}" + name: pod1 + userns: auto + state: created + register: pod_userns_b_info + + - name: Check info + assert: + that: + - pod_userns_b_info is not changed + - name: Start pod with labels containers.podman.podman_pod: executable: "{{ test_executable | default('podman') }}" @@ -737,11 +778,13 @@ generate_systemd: path: /tmp/dir1 restart_policy: always - time: 120 no_header: true names: true pod_prefix: poditto container_prefix: ainer + restart_sec: 10 + start_timeout: 20 + stop_timeout: 15 register: system1 - name: Check systemd file exists @@ -753,8 +796,9 @@ assert: that: - system1.podman_systemd.keys() | list | length == 3 - - "'-t 120 ' in system1.podman_systemd['poditto-pod2']" + - "'-t 15 ' in system1.podman_systemd['poditto-pod2']" - "'Restart=always' in system1.podman_systemd['poditto-pod2']" + - "'RestartSec=10' in system1.podman_systemd['poditto-pod2']" - "'autogenerated by Podman' not in system1.podman_systemd['poditto-pod2']" - podsys_stat.stat.exists | bool @@ -881,3 +925,11 @@ args: apply: become: true + +- name: Test podman_pod for limiting resources + include_tasks: resource-limit.yml + vars: + ansible_python_interpreter: "/usr/bin/python3" + args: + apply: + become: true diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/net-pod.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/net-pod.yml index 3341f52a8..626a60cee 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/net-pod.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/net-pod.yml @@ -12,6 +12,7 @@ executable: "{{ test_executable | default('podman') }}" name: "{{ item }}" state: absent + force: true loop: - testnet - anothernet @@ -73,6 +74,7 @@ executable: "{{ test_executable | default('podman') }}" name: "{{ item }}" state: absent + force: true loop: - testnet - anothernet diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/resource-limit.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/resource-limit.yml new file mode 100644 index 000000000..94017d9f9 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_pod/tasks/resource-limit.yml @@ -0,0 +1,38 @@ +- name: Test podman_pod for limiting resources + block: + + - name: Set variables for limiting resources + set_fact: + limit: + blkio_weight: 123 + cpuset_mems: '0-1' + cpu_shares: 1024 + device_write_bps: ['/dev/zero:1048576'] + + - name: Create pod for limiting resources + containers.podman.podman_pod: + name: limited-pod + state: created + blkio_weight: "{{ limit.blkio_weight }}" + cpuset_mems: "{{ limit.cpuset_mems }}" + cpu_shares: "{{ limit.cpu_shares }}" + device_write_bps: "{{ limit.device_write_bps }}" + + - name: Get information on pod for limiting resources + containers.podman.podman_pod_info: + name: limited-pod + register: pod_info + + - name: Check if the result is as expected + assert: + that: + - item.blkio_weight == limit.blkio_weight + - item.cpuset_mems == limit.cpuset_mems + - item.cpu_shares == limit.cpu_shares + with_items: "{{ pod_info.pods }}" + + always: + - name: Cleanup + containers.podman.podman_pod: + name: limited-pod + state: absent diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/Dockerfile b/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/Dockerfile new file mode 100644 index 000000000..8c97ff6d9 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine + +LABEL install="podman run --env IMAGE=IMAGE --rm IMAGE /bin/sh /testinstall.sh" +LABEL run="/usr/bin/touch /tmp/testedrunfortests" + +ADD testinstall.sh / diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/testinstall.sh b/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/testinstall.sh new file mode 100644 index 000000000..d9fe1ee5a --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/files/testinstall.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo -n "Installed." diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/tasks/main.yml new file mode 100644 index 000000000..2ddc8bff6 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_runlabel/tasks/main.yml @@ -0,0 +1,48 @@ +--- +- name: Create directory for user build images + file: + path: /tmp/usr_img + state: directory + +- name: Copy Dockerfile to container build directory + copy: + src: "{{ item }}" + dest: "/tmp/usr_img/{{ item }}" + mode: 755 + loop: + - Dockerfile + - testinstall.sh + +- name: Build test docker image for regular user + containers.podman.podman_image: + executable: "{{ test_executable | default('podman') }}" + name: "{{ runlabel_image }}" + path: /tmp/usr_img + build: + format: docker + extra_args: --cgroup-manager=cgroupfs + +- name: Run container label install + containers.podman.podman_runlabel: + image: "{{ runlabel_image }}" + label: install + register: install_runlabel + +- name: Run container label run + containers.podman.podman_runlabel: + image: "{{ runlabel_image }}" + label: run + +- name: Check file for run exists + stat: + path: /tmp/testedrunfortests + register: testedrunfortests + +- name: Make sure files exist + assert: + that: + - testedrunfortests.stat.exists + +- name: Make sure install label exited with 128 + assert: + that: install_runlabel.stdout == 'Installed.' diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_save/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_save/tasks/main.yml index 97c8a66f3..f78753f7d 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_save/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_save/tasks/main.yml @@ -2,12 +2,15 @@ - name: Pull image containers.podman.podman_image: executable: "{{ test_executable | default('podman') }}" - name: k8s.gcr.io/pause + name: "{{ item }}" + loop: + - registry.k8s.io/pause + - registry.k8s.io/coredns/coredns:v1.9.3 - name: Save image containers.podman.podman_save: executable: "{{ test_executable | default('podman') }}" - image: k8s.gcr.io/pause + image: registry.k8s.io/pause dest: /tmp/image.tar - name: Check file @@ -23,7 +26,7 @@ - name: Save image containers.podman.podman_save: executable: "{{ test_executable | default('podman') }}" - image: k8s.gcr.io/pause + image: registry.k8s.io/pause dest: /tmp/image.tar force: true @@ -40,7 +43,7 @@ - name: Save image containers.podman.podman_save: executable: "{{ test_executable | default('podman') }}" - image: k8s.gcr.io/pause + image: registry.k8s.io/pause dest: /tmp/imagedir format: oci-dir @@ -57,7 +60,7 @@ - name: Save image containers.podman.podman_save: executable: "{{ test_executable | default('podman') }}" - image: k8s.gcr.io/pause + image: registry.k8s.io/pause dest: /tmp/imagedir-docker force: true format: docker-dir @@ -66,7 +69,7 @@ - name: Save image containers.podman.podman_save: executable: "{{ test_executable | default('podman') }}" - image: k8s.gcr.io/pause + image: registry.k8s.io/pause dest: /tmp/imagedir force: true format: oci-dir @@ -84,7 +87,7 @@ - name: Save image containers.podman.podman_save: executable: "{{ test_executable | default('podman') }}" - image: k8s.gcr.io/pause + image: registry.k8s.io/pause dest: /tmp/image2.tar multi_image_archive: true @@ -97,3 +100,22 @@ assert: that: - img.stat.exists + +- name: Save multi image + containers.podman.podman_save: + executable: "{{ test_executable | default('podman') }}" + image: + - registry.k8s.io/pause + - registry.k8s.io/coredns/coredns:v1.9.3 + dest: /tmp/image-multi.tar + multi_image_archive: true + +- name: Check mult image file + stat: + path: /tmp/image-multi.tar + register: img + +- name: Check multi image is saved + assert: + that: + - img.stat.exists diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_secret/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_secret/tasks/main.yml index c6c90de90..66f827df5 100644 --- a/ansible_collections/containers/podman/tests/integration/targets/podman_secret/tasks/main.yml +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_secret/tasks/main.yml @@ -1,6 +1,18 @@ - name: Test podman_secret block: + - name: Discover podman version + shell: podman version | grep "^Version:" | awk {'print $2'} + register: podman_v + + - name: Set podman version fact + set_fact: + podman_version: "{{ podman_v.stdout | string }}" + + - name: Set podman version fact to gt than 4.7.0 if so + set_fact: + podman_version_gt470: "{{ podman_version is version('4.7.0', '>=') }}" + - name: Make sure secret doesn't exist containers.podman.podman_secret: executable: "{{ test_executable | default('podman') }}" @@ -11,6 +23,7 @@ containers.podman.podman_secret: executable: "{{ test_executable | default('podman') }}" name: mysecret + debug: true data: secret content - name: Recreate secret @@ -27,13 +40,33 @@ name: mysecret data: super secret content skip_existing: true + debug: true register: skipped + - name: Force secret to same + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: super secret content + force: true + debug: true + register: forced2 + - name: Check assertions assert: that: - forced is changed - skipped is not changed + - forced2 is changed + when: not podman_version_gt470 + + - name: Check assertions for podman >= 4.7.0 + assert: + that: + - forced is changed + - skipped is not changed + - forced2 is not changed + when: podman_version_gt470 - name: Create container that uses secret containers.podman.podman_container: @@ -93,6 +126,24 @@ that: - removed is not changed + - name: Create secret with file driver labels + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: secret content + driver: file + labels: + lab1: somestringhere + label2: "some value is there" + "long label": onestring + "boring label": "multi string value" + + - name: Remove secret + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + state: absent + name: mysecret + - name: Create secret with file driver and custom options containers.podman.podman_secret: executable: "{{ test_executable | default('podman') }}" @@ -103,6 +154,131 @@ a: b c: d + - when: podman_version_gt470 + block: + + - name: Create secret with file driver and different options + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: secret content + driver: file + driver_opts: + a: b + c: e + register: opts_changed + + - name: Create secret with file driver and different options again + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: secret content + driver: file + driver_opts: + a: b + c: e + register: opts_changed2 + + - name: Create secret with different content + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: other secret content + driver_opts: + a: b + c: e + register: secret_changed + + - name: Create secret with different content again + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: other secret content + driver_opts: + a: b + c: e + register: secret_changed2 + + - name: Create secret with different content but skipped + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: other secret content and skipped + skip_existing: true + debug: true + driver_opts: + a: b + c: e + register: skip_secret_changed + + - name: Create secret with different content but forced + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: other secret content and skipped + force: true + debug: true + driver_opts: + a: b + c: e + register: force_secret_changed + + - name: Check opts changes + assert: + that: + - opts_changed is changed + - opts_changed2 is not changed + - secret_changed is changed + - secret_changed2 is not changed + - skip_secret_changed is not changed + - force_secret_changed is changed + + - name: Create secret with file driver and labels + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: secret content + driver: file + labels: + lab1: somestringhere + label2: "some value is there" + "long label": onestring + "boring label": "multi string value" + register: secretlabels + + - name: Create secret with file driver and labels again + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: secret content + driver: file + labels: + lab1: somestringhere + label2: "some value is there" + "long label": onestring + "boring label": "multi string value" + register: secretlabels2 + + - name: Create secret with file driver and different labels + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + data: secret content + driver: file + labels: + lab1: somestringhere + label2: "some value is not there" + "long label": onestring + "boring label": "multi string value" + register: secretlabels3 + + - name: Check labels changes + assert: + that: + - secretlabels is changed + - secretlabels2 is not changed + - secretlabels3 is changed + - name: Remove secret containers.podman.podman_secret: executable: "{{ test_executable | default('podman') }}" diff --git a/ansible_collections/containers/podman/tests/integration/targets/podman_secret_info/tasks/main.yml b/ansible_collections/containers/podman/tests/integration/targets/podman_secret_info/tasks/main.yml new file mode 100644 index 000000000..90c588f63 --- /dev/null +++ b/ansible_collections/containers/podman/tests/integration/targets/podman_secret_info/tasks/main.yml @@ -0,0 +1,107 @@ +- name: Test podman_secret + block: + + - name: Discover podman version + shell: podman version | grep "^Version:" | awk {'print $2'} + register: podman_v + + - name: Set podman version fact + set_fact: + podman_version: "{{ podman_v.stdout | string }}" + + - name: Set podman version fact to gt than 4.7.0 if so + set_fact: + podman_version_gt470: "{{ podman_version is version('4.7.0', '>=') }}" + + - name: Make sure secrets don't exist + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + state: absent + name: "{{ item }}" + loop: + - mysecret + - second_secret + + - name: Create secret + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + debug: true + data: secret content + + - name: Create another secret + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + name: second_secret + debug: true + data: "not secret content" + + - name: Get info about all secrets + containers.podman.podman_secret_info: + executable: "{{ test_executable | default('podman') }}" + register: secrets_info + + - name: Get info about one secret + containers.podman.podman_secret_info: + executable: "{{ test_executable | default('podman') }}" + name: mysecret + register: mysecret_info + + - name: Get info about second secret with secret data + containers.podman.podman_secret_info: + executable: "{{ test_executable | default('podman') }}" + name: second_secret + showsecret: true + register: second_secret_info + when: podman_version_gt470 + + - name: Get info about secret that does not exist + containers.podman.podman_secret_info: + executable: "{{ test_executable | default('podman') }}" + name: doesnotexist + register: notfound + ignore_errors: true + + # Delete all secrets + - name: Remove secrets + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + state: absent + name: "{{ item }}" + loop: + - mysecret + - second_secret + + - name: Get info about all secrets when no secrets + containers.podman.podman_secret_info: + executable: "{{ test_executable | default('podman') }}" + register: secrets_info2 + + - name: Check secrets info + assert: + that: + - secrets_info.secrets | length == 2 + - mysecret_info.secrets | length == 1 + - mysecret_info.secrets[0].Spec.Name == 'mysecret' + - "'SecretData' not in mysecret_info.secrets[0]" + - notfound is failed + - secrets_info2.secrets | length == 0 + + - name: Check secrets info for Podman > 4.7.0 + assert: + that: + - second_secret_info.secrets[0].SecretData == 'not secret content' + - second_secret_info.secrets | length == 1 + - second_secret_info.secrets[0].Spec.Name == 'second_secret' + when: podman_version_gt470 + + always: + + - name: Remove secrets + containers.podman.podman_secret: + executable: "{{ test_executable | default('podman') }}" + state: absent + name: "{{ item }}" + loop: + - mysecret + - second_secret -- cgit v1.2.3