Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.
/ ansible-podman Public archive

Ansible podman is a package to allow ansible playbooks to manage podman containers

License

Notifications You must be signed in to change notification settings

containers/ansible-podman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ansible Module for Podman

This module allows Ansible to use Podman to manage container images.

Requirements

  • Python 3.6+
  • Ansible 2.8

Installation

  1. Install Podman
  2. 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
  1. Copy podman_images_v2.py to 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
          • present
          • build
          • absent
          Set the state of the image

          About

          Ansible podman is a package to allow ansible playbooks to manage podman containers

          Resources

          License

          Code of conduct

          Security policy

          Stars

          Watchers

          Forks

          Releases

          No releases published

          Packages

          No packages published

          Languages