Skip to content

jomrr/ansible-role-podman

Repository files navigation

ansible-role-podman Build Status

Ansible role for setting up podman.

As podman now creates a working default configuration, the variable podman_configure was introduced to skip custom configuration. In erlier versions podman used journald as events_logger and threw an error in rootless mode, which made explicit configuration of file necessary.

Supported Platforms

  • Archlinux
  • CentOS 7
  • Ubuntu 18.04

Requirements

Ansible 2.7 or higher is required for defaults/main/*.yml to work correctly.

Variables

Variables for this role:

variable defaults/main/*.yml type description
podman_enabled False boolean determine whether role is enabled (true) or not (false)
podman_configure False boolean use default configuration when False, write config, when True
podman_users { root: '100000:65535' } dictionary podman users that get uid mapping configured
podman_manual_mapping True boolean ansible managed /etc/subuid and /etc/subgid entries
podman_search_registries - 'docker.io' items list of registries that podman is pulling images from
podman_insecure_registries [] items non TLS registries for podman, i.e. localhost:5000
podman_blocked_registries [] items blocked container registries
podman_conf_cgroup_manager 'systemd' string /etc/container/libpod.conf: cgroup_manager
podman_conf_events_logger 'file' string /etc/container/libpod.conf: events_logger, due to podman error with journald, see issue
podman_conf_namespace '' string /etc/container/libpod.conf: namespace (=default namespace)
podman_storage_driver 'overlay' string storage driver
podman_storage_mountopt 'nodev' string storage driver mount options

Dependencies

None.

Example Playbook

For a basic setup with default values run:

---
# play: example-site
# file: site.yml

- hosts: podman_hosts
  vars:
    podman_enabled: True
    podman_users:
      root: '100000:65535'
      myuser1: '165536:65535'
      ...
    podman_registries:
      - 'registry.access.redhat.com'
      - 'docker.io'
      - 'registry.fedoraproject.org'
      - 'quay.io'
      - 'registry.centos.org'
  roles:
    - role: ansible-role-podman

License and Author

Licensed under MIT License; See LICENSE file in repository.

References

About

Ansible role for setting up Podman.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages