Role - tripleo-container-stop

Role Documentation

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

Role Defaults

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

tripleo_containers_to_stop: '{{ default([]) }}'
tripleo_delegate_to:
- localhost

Molecule Scenarios

Molecule is being used to test the “tripleo-container-stop” 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-stop
    tripleo_containers_to_stop:
    - docker-container1
    - docker-container2
  vars:
    ansible_python_interpreter: '{{ ansible_user_dir }}/test-python/bin/python'

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-stop
    tripleo_containers_to_stop:
    - podman-container1
    - podman-container2
  vars:
    ansible_python_interpreter: '{{ ansible_user_dir }}/test-python/bin/python'