https://github.com/pycodebe/ansible-role-podman
Ansible role for installing, configuring, and uninstalling the Podman package across multiple Linux distributions (Fedora, Debian). Ensures consistent deployment and management of the Podman container runtime.
https://github.com/pycodebe/ansible-role-podman
ansible ansible-role container infrastructure-as-code infratest podman python3
Last synced: 12 months ago
JSON representation
Ansible role for installing, configuring, and uninstalling the Podman package across multiple Linux distributions (Fedora, Debian). Ensures consistent deployment and management of the Podman container runtime.
- Host: GitHub
- URL: https://github.com/pycodebe/ansible-role-podman
- Owner: pycodebe
- License: mit
- Created: 2024-12-15T10:28:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-26T14:21:05.000Z (about 1 year ago)
- Last Synced: 2024-12-31T19:18:24.676Z (about 1 year ago)
- Topics: ansible, ansible-role, container, infrastructure-as-code, infratest, podman, python3
- Language: Jinja
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: Podman Management
[](https://github.com/pre-commit/pre-commit)
[](https://opensource.org/licenses/MIT)
## Overview
Ansible role for Podman installation, configuration, and lifecycle management across Linux distributions.
## Features
- Install, uninstall, update, configure registry and verify Podman
- Cross-platform support (Fedora 41, Debian 12.8)
## Requirements
- Ansible 2.18+
- Python 3.11
## Quick Start
### Clone Repository
```
git clone https://github.com/pycodebe/podman-ansible-role.git
conda env create -f environment.yml
conda activate ansible-role-podman
```
```
# .env
export LOCAL_VENV_BIN=~/miniconda3/envs/ansible-role-podman/bin/
export PYTHON_INTERPRETER=$LOCAL_VENV_BIN/python3.11
export ANSIBLE_PLAYBOOK_BIN=$LOCAL_VENV_BIN/ansible-playbook
```
```
# inventory.cfg
[all]
localhost ansible_connection=local
```
```
# playbook.yml
---
- name: Run ansible role podman
hosts: all
gather_facts: true
roles:
- role: ansible_role_podman
```
## Usage
This role supports three main actions: **install**, **uninstall**, and **update**.
1. **Install Podman**:
```
source .env
$ANSIBLE_PLAYBOOK_BIN -i inventory.cfg playbook.yml -e "podman_action=install"
```
2. **Uninstall Podman**:
```
source .env
$ANSIBLE_PLAYBOOK_BIN -i inventory.cfg playbook.yml -e "podman_action=uninstall"
```
3. **Update Podman**:
```
source .env
$ANSIBLE_PLAYBOOK_BIN -i inventory.cfg playbook.yml -e "podman_action=update"
```
4. **Install Podman and configure registry**:
```
source .env
$ANSIBLE_PLAYBOOK_BIN -i inventory.cfg playbook.yml -e "podman_action=install_and_configure_registry"
```
5. **Configure registry**:
```
source .env
$ANSIBLE_PLAYBOOK_BIN -i inventory.cfg playbook.yml -e "podman_action=configure_registry"
```
## Testing
### Run Molecule tests
```
molecule test -s install
molecule test -s uninstall
molecule test -s configure_registry
```
## Dependencies
- None
## License
MIT