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

Latest commit

 

History

History
91 lines (83 loc) · 1.72 KB

README.md

File metadata and controls

91 lines (83 loc) · 1.72 KB

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