I decided to convert the Ansible code to Bash for simplicity.
Ansible role to install Podman on Debian hosts.
This role has been tested with Debian 12 (bookworm).
Podman will be installed using the official podman
package from the Debian repositories. In addition, this role allows you to configure some other related stuff, such as the Podman socket and the podman-auto-update
service, both for the system scope and for individual users.
- Install this role using the
ansible-galaxy
CLI tool - You can then include it into the
tasks
section of your Ansible Playbook. Seetest/playbook.yml
for an example of how to do that. Remember to replace the role name withdmotte.podman
.
Note: this role must be run as root (
ansible_become: true
).
See defaults/main.yml
.
Once you have set up Podman on your host using this Ansible role, see the following link for some useful commands to manage your services:
https://github.com/dmotte/misc/tree/main/snippets#shell-snippets-for-podman
If you want to contribute to this project, you can use the test/playbook.yml
file to test the role while editing it.
Place your inventory file (e.g. hosts.yml
) inside the test
folder.
Edit the vars
section of the test/playbook.yml
file to match your scenario.
You can then execute the playbook against your host:
cd test/
ansible-playbook -i hosts.yml playbook.yml