Role - tripleo-podman

Role Documentation

Welcome to the “tripleo_podman” role documentation.

Role Defaults

This section highlights all of the defaults and variables set within the “tripleo_podman” role.

# All variables intended for modification should be placed in this file.
tripleo_podman_hide_sensitive_logs: '{{ hide_sensitive_logs | default(true) }}'
tripleo_podman_debug: '{{ ((ansible_verbosity | int) >= 2) | bool }}'

tripleo_podman_buildah_login: false
tripleo_container_registry_insecure_registries: []
tripleo_container_registry_login: false
tripleo_container_registry_logins: {}
tripleo_podman_packages: '{{ _tripleo_podman_packages | default([]) }}'
tripleo_buildah_packages: '{{ _tripleo_buildah_packages | default([]) }}'
tripleo_podman_purge_packages: '{{ _tripleo_podman_purge_packages | default([]) }}'
tripleo_podman_tls_verify: true
tripleo_podman_unqualified_search_registries:
- registry.redhat.io
- registry.access.redhat.com
- registry.fedoraproject.org
- registry.centos.org
- docker.io
tripleo_podman_insecure_registries: '{{ tripleo_container_registry_insecure_registries
  }}'
# tripleo_podman_registries requires a list of dictionaries
# Example:
# tripleo_podman_registries:
#   - prefix: docker.io
#     insecure: false
#     location: docker.io
#     mirrors:
#       - location: 192.168.0.1:8787
#         insecure: true
#   - prefix: registry.redhat.io
#     insecure: false
#     location: registry.redhat.io
#     mirrors:
#       - location: 192.168.0.2:8787
#         insecure: false
#   - prefix: registry.fedoraproject.org
#     blocked: true
tripleo_podman_registries: []

Role Variables: redhat-8.2.yml

_tripleo_podman_packages:
- podman-1.6.4

_tripleo_buildah_packages:
- buildah-1.11.6

_tripleo_podman_purge_packages:
- docker
- docker-ce

Role Variables: redhat.yml

_tripleo_podman_packages:
- podman

_tripleo_buildah_packages:
- buildah

_tripleo_podman_purge_packages:
- docker
- docker-ce

Molecule Scenarios

Molecule is being used to test the “tripleo_podman” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.

Scenario: default

Driver: delegated
Molecule Options
managed: false
login_cmd_template: >-
  ssh
  -o UserKnownHostsFile=/dev/null
  -o StrictHostKeyChecking=no
  -o Compression=no
  -o TCPKeepAlive=yes
  -o VerifyHostKeyDNS=no
  -o ForwardX11=no
  -o ForwardAgent=no
  {instance}
ansible_connection_options:
  ansible_connection: ssh
Molecule Inventory
hosts:
  all:
    hosts:
      instance:
        ansible_host: localhost
Example default playbook
- name: Converge
  hosts: all
  roles:
  - role: tripleo_podman

Scenario: login

Driver: delegated
Molecule Options
managed: false
login_cmd_template: >-
  ssh
  -o UserKnownHostsFile=/dev/null
  -o StrictHostKeyChecking=no
  -o Compression=no
  -o TCPKeepAlive=yes
  -o VerifyHostKeyDNS=no
  -o ForwardX11=no
  -o ForwardAgent=no
  {instance}
ansible_connection_options:
  ansible_connection: ssh
Molecule Inventory
hosts:
  all:
    hosts:
      instance:
        ansible_host: localhost
Example login playbook
- name: Converge
  hosts: all
  vars:
    tripleo_podman_hide_sensitive_logs: false
    tripleo_podman_buildah_login: true
    tripleo_podman_tls_verify: false
    tripleo_container_registry_logins:
      localhost:5000:
        testuser: testpassword
  tasks:
  - include_role:
      name: tripleo_podman
      tasks_from: tripleo_podman_login.yml
  - include_role:
      name: tripleo_podman
      tasks_from: tripleo_podman_buildah_login.yml

Scenario: install

Driver: delegated
Molecule Options
managed: false
login_cmd_template: >-
  ssh
  -o UserKnownHostsFile=/dev/null
  -o StrictHostKeyChecking=no
  -o Compression=no
  -o TCPKeepAlive=yes
  -o VerifyHostKeyDNS=no
  -o ForwardX11=no
  -o ForwardAgent=no
  {instance}
ansible_connection_options:
  ansible_connection: ssh
Molecule Inventory
hosts:
  all:
    hosts:
      instance:
        ansible_host: localhost
Example install playbook
- name: Converge
  hosts: all
  tasks:
  - name: Run install
    include_role:
      name: tripleo_podman
      tasks_from: tripleo_podman_install.yml
      vars_from: redhat.yml