Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derjd/ansible-podman
Ansible Role installing and configuring podman
https://github.com/derjd/ansible-podman
ansible ansible-role podman role
Last synced: about 1 month ago
JSON representation
Ansible Role installing and configuring podman
- Host: GitHub
- URL: https://github.com/derjd/ansible-podman
- Owner: derJD
- Created: 2019-11-10T19:15:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-03T18:15:34.000Z (almost 4 years ago)
- Last Synced: 2024-11-12T17:17:21.973Z (3 months ago)
- Topics: ansible, ansible-role, podman, role
- Language: Makefile
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Podman
======Install and configure podman.
Valid options for storage.conf can be seen [here](https://github.com/containers/storage/blob/master/docs/containers-storage.conf.5.md).
Valid options for registries.conf can be seen [here](https://github.com/containers/image/blob/master/docs/containers-registries.conf.5.md).Requirements
------------* Please ensure that you install all collections described in [depencency section](#dependencies)
* Please do not use `gather_facts: no` as it's needed for distinguishing OS distributionsRole Variables
--------------| Variable | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
| `podman_packages` | List | `["podman"]` | List of packages to install |
| `podman_packages_state` | String | `present` | State of package to install |
| `podman_socket` | Bool | False | Enable docker compatible podman API service |
| `podman_conf_dir` | String | `/etc/containers/` | Container config directory |
| `podman_storage_conf_file` | String | `/etc/containers/storage.conf` | Path to storage.conf |
| `podman_registries_conf_file` | String | `/etc/containers/registries.conf` | Path to registries.conf |
| `podman_storage_settings` | Dict | `{}` | Settings for storage.conf |
| `podman_registries_settings` | Dict | `{}` | Settings for registries.conf |
| `podman_repo_base_url` | String | [See defaults/main.yml](defaults/main.yml#L13) | libcontainer's repository URL |
| `podman_repo_distro` | String | `{{ ansible_distribution }}_{{ ansible_distribution_version }}` | String containing Distro and version |
| `podman_yum_repo_url` | String | `{{ podman_repo_base_url }}{{ ansible_distribution }}_{{ ansible_distribution_major_version }}` | YUM repo URL |
| `podman_rpm_key` | String | `{{ podman_repo_base_url }}{{ podman_repo_distro }}/repodata/repomd.xml.key` | URL to the RPM key |
| `podman_libseccomp2_backport_releases` | List | `["buster"]` | List of releases that needs libseccomp2 installed from backports |Dependencies
------------This role depends on a collection. Currently there is no way of handling these dependencies within roles meta [and there won't be any.](https://github.com/ansible/ansible/issues/62847#issuecomment-756836439)
* [![Galaxy](https://img.shields.io/static/v1??style=flat&logo=ansible&label=galaxy&message=derJD.general&color=blue)](https://galaxy.ansible.com/derJD/general)
Install directly `ansible-galaxy collection install derjd.general` or via `requirements.yml`:
```yaml
---collections:
- derjd.general```
Example Playbook
----------------* Most basic example
```yaml
---- hosts: servers
become_user: root
roles:
- derJD.podman
```* Use zfs as storage driver and let it use a different dataset
```yaml
---- hosts: servers
become_user: root
vars:
podman_storage_settings:
storage:
driver: zfs
storage.options.zfs:
fsname: rpool/podmantasks:
- name: zfs create rpool/podman
community.general.zfs:
name: rpool/podman
state: present
extra_zfs_properties:
mountpoint: none- include_role:
name: derJD.podman
```* Example with many config switches
```yaml
---- hosts: servers
become_user: root
vars:
podman_storage_settings:
storage:
driver: zfs
storage.options:
override_kernel_check: true
storage.options.thinpool:
skip_mount_home: false
fs: ext4
podman_registries_settings:
registries.search:
regestries:
- docker.io
- registry.fedoraproject.org
- quay.io
- registry.access.redhat.com
- registry.centos.org
registries.block:
registries: []roles:
- derJD.podman
```License
-------BSD
Author Information
------------------[derJD](https://github.com/derJD/)