mirror of
https://github.com/containers/ansible-podman
synced 2026-07-21 14:13:56 +00:00
No description
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| examples | ||
| modules | ||
| tests | ||
| CODE-OF-CONDUCT.md | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
Ansible Module for Podman
This module allows Ansible to use Podman to manage container images.
Requirements
- Python 3.6+
- Ansible 2.8
Installation
- Install Podman
- Install Python-podman library on the host you will be running ansible playbooks.
git clone git@github.com:containers/python-podman.git
cd ~/python-podman
python3 setup.py clean -a && python3 setup.py sdist bdist
python3 setup.py install --user
- Copy
podman_images_v2.pyto your directory library
../podman_test/
├── library
│ └── podman_image_v2.py
└── pull_image.yml
Usage Examples
This module will pull the fedora latest image from docker hub.
hosts: localhost
tasks:
- name: Pull an image
podman_image_v2:
name: fedora
register: result
- debug: var=result
Parameters
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| name | yes | Set image name | ||
| tag | no | latest | Set the tag of the image | |
| pull | no | true | Set the pull option | |
| force | no | false | Set to pull an image forcefully | |
| state | no | present |
|
Set the state of the image |