Role - tripleo-container-tag

Role Documentation

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

Role Defaults

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

tripleo_container_cli: '{{ container_cli | default(''docker'') }}'
tripleo_container_image: '{{ container_image | default('''') }}'
tripleo_container_image_latest: '{{ container_image_latest | default(''latest'') }}'
tripleo_container_pull_image: '{{ pull_image | default(true) }}'

Molecule Scenarios

Molecule is being used to test the “tripleo-container-tag” 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
- become: true
  hosts: all
  name: Converge
  roles:
  - role: tripleo-container-tag
    tripleo_container_cli: docker
    tripleo_container_image: centos:8
    tripleo_container_image_latest: test-latest
    tripleo_container_pull_image: true
  - role: tripleo-container-tag
    tripleo_container_cli: docker
    tripleo_container_image: centos:8
    tripleo_container_image_latest: test-latest-2
    tripleo_container_pull_image: false

Scenario: podman

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 podman playbook
- become: true
  hosts: all
  name: Converge
  roles:
  - role: tripleo-container-tag
    tripleo_container_cli: podman
    tripleo_container_image: centos:8
    tripleo_container_image_latest: test-latest
  - role: tripleo-container-tag
    tripleo_container_cli: podman
    tripleo_container_image: centos:8
    tripleo_container_image_latest: test-latest-2
    tripleo_container_pull_image: false

Scenario: legacy_vars

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 legacy_vars playbook
- become: true
  hosts: all
  name: Converge
  roles:
  - container_cli: podman
    container_image: centos:8
    container_image_latest: test-latest
    role: tripleo-container-tag
  - container_cli: podman
    container_image: centos:8
    container_image_latest: test-latest-2
    container_pull_image: false
    role: tripleo-container-tag