<style> .reveal { font-size: 29px; } </style> # Ansible Podman collections slides: https://hackmd.io/@sshnaidm/ansible-podman-collection --- ### Ansible Podman modules before and now - `podman_image` only module existed before 2.10. - After the Big Split in Ansible (from 2.10) `podman_image` module moved to [Podman Ansible collection repository](https://github.com/containers/ansible-podman-collections) under [Containers namespace](https:///github.com/containers) where Podman is developed. - Branchless, releases based, published to [Ansible Galaxy `containers.podman`](https://galaxy.ansible.com/containers/podman) namespace. - Support Podman containers and pods from 1.6.4 version. - Possible to use from Ansible version 2.8 as collections. --- ### Collection purpose and goals - Management of Podman containers, images, networks, pods etc. - Keep infrastructure as a code and orchestrate containers. Playbook example of Redis container launch: ```yaml - name: Using Podman collection hosts: localhost tasks: - name: Run redis container containers.podman.podman_container: name: myredis image: redis command: redis-server --appendonly yes state: present recreate: yes publish: - 6379 volumes_from: - mydata ``` --- <!-- .slide: style="font-size: 24px;" --> ### Which modules do we have? * Management of Podman containers - <span style="color:green">`podman_container_info`</span>, <span style="color:green">`podman_container`</span> * Speed up multiple containers setup - <span style="color:green">`podman_containers`</span> * Management and building of Podman images - <span style="color:green">`podman_image_info`</span>, <span style="color:green">`podman_image`</span> * Manage authentication with registries - <span style="color:green">`podman_login_info`</span>, <span style="color:green">`podman_login`</span>, <span style="color:green">`podman_logout`</span> * Podman networks - <span style="color:green">`podman_network_info`</span>, <span style="color:green">`podman_network`</span> * Play Kubernetes YAML files with Podman pods - <span style="color:green">`podman_play`</span> * Podman Pods management - <span style="color:green">`podman_pod_info`</span>, <span style="color:green">`podman_pod`</span> * Podman volumes management - <span style="color:green">`podman_volume_info`</span>, <span style="color:green">`podman_volume`</span> --- ### Usage * Used in TripleO to orchestrate Podman containers with Openstack services Know about other use cases? Tell me! <!-- .element: class="fragment" data-fragment-index="1" --> sshnaidm@redhat.com <!-- .element: class="fragment" data-fragment-index="1" --> --- ### Installation and Support Simple install: ```bash ansible-galaxy collection install containers.podman ``` Or just install Ansible (it's part of "Big Ansible"). Alternative ways: ```bash dnf install ansible-collection-containers-podman ``` Installation path: `/usr/share/ansible/collections`. - **Upstream**: [Fedora package](https://src.fedoraproject.org/rpms/ansible-collection-containers-podman), [RDO CentOS package](http://mirror.centos.org/centos/8/cloud/x86_64/openstack-train/Packages/a/) - **Downstream**: probably from OSP 17 ### Support Not supported by Red Hat. --- ### Development and docs * Development: https://github.com/containers/ansible-podman-collections/ * Issues: https://github.com/containers/ansible-podman-collections/issues * Current docs: https://containers.github.io/ansible-podman-collections/ * Docs of included in Ansible release: https://docs.ansible.com/ansible/latest/collections/containers/podman * Testing: CI with Github Actions, good functional testing and `ansible-test` for sanity. * Docker relation --- Thanks for watching!
{"metaMigratedAt":"2023-06-16T00:36:20.271Z","metaMigratedFrom":"YAML","title":"Ansible Podman collection","breaks":true,"description":"Ansible Podman collection overview","contributors":"[{\"id\":\"3d0a6adb-ac9b-40f9-9764-93772fb3f6df\",\"add\":5058,\"del\":1141}]"}
    1702 views