Role - tripleo-container-manage

Role Documentation

Welcome to the “tripleo-container-manage” role documentation.

Role Defaults

This section highlights all of the defaults and variables set within the “tripleo-container-manage” role.

tripleo_container_manage_cli: podman
tripleo_container_manage_concurrency: 1
tripleo_container_manage_config: /var/lib/tripleo-config/
tripleo_container_manage_config_id: tripleo
tripleo_container_manage_config_patterns: hashed-*.json
tripleo_container_manage_debug: false
tripleo_container_manage_healthcheck_disabled: false
tripleo_container_manage_log_path: /var/log/containers/stdouts

Molecule Scenarios

Molecule is being used to test the “tripleo-container-manage” 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
ansible_connection_options:
  ansible_connection: ssh
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}
managed: false
Molecule Inventory
hosts:
  all:
    hosts:
      instance:
        ansible_host: localhost
Example default playbook
- gather_facts: false
  hosts: all
  name: Converge
  post_tasks:
  - become: true
    block:
    - command: podman container exists fedora
      name: Check for fedora container
    - name: Gather facts about fedora container
      podman_container_info:
        name: fedora
      register: fedora_infos
    - assert:
        fail_msg: fedora container has wrong image
        success_msg: fedora container has the right image
        that:
        - '''fedora:latest'' in fedora_infos.containers.0.ImageName'
      name: Assert that fedora container has the right image
    name: Verify that Fedora container was created correctly
  tasks:
  - include_role:
      name: tripleo-container-manage
  vars:
    tripleo_container_manage_config: /tmp/container-configs
    tripleo_container_manage_config_patterns: '*.json'
    tripleo_container_manage_debug: true