Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 podman
Last synced: about 1 month 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 2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-23T17:31:53.000Z (about 1 month ago)
- Last Synced: 2024-12-23T17:32:52.403Z (about 1 month ago)
- Topics: ansible, ansible-role, container, infrastructure-as-code, podman
- Language: Jinja
- Homepage:
- Size: 11.7 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
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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
``````
# .envexport 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 installmolecule test -s uninstall
molecule test -s configure_registry
```## Dependencies
- None
## License
MIT