This module allows Ansible to use Podman to manage container images.
- Python 3.6+
- Ansible 2.8
- Install Podman
- Install Python-podman library on the host you will be running ansible playbooks.
git clone [email protected]: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.py
to your directory library
../podman_test/
├── library
│ └── podman_image_v2.py
└── pull_image.yml
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
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 |