Role - tripleo_ovn

Role Documentation

Welcome to the “tripleo_ovn” role documentation.

Role Defaults

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

# defaults file for tripleo_ovn
tripleo_ovn_bridge: br-int
tripleo_ovn_bridge_mappings: [datacentre:br-ex]
tripleo_ovn_encap_type: geneve
tripleo_ovn_dbs: []
tripleo_enable_dvr: true
tripleo_enable_hw_offload: false
tripleo_ovn_multi_rhel: false
tripleo_enable_internal_tls: false
tripleo_ovn_sb_server_port: 6642
tripleo_ovn_of_probe_interval: 60
tripleo_ovn_remote_probe_interval: 60000
tripleo_ovn_controller_image: quay.io/tripleomastercentos9/openstack-ovn-controller:current-tripleo
tripleo_ovn_encap_ip: '{{ tenant_ip }}'
tripleo_ovn_protocol: '{% if tripleo_enable_internal_tls | bool %}ssl{% else %}tcp{%
  endif %}'

tripleo_ovn_controller_common_volumes:
- /lib/modules:/lib/modules:ro
- /run:/run
- /var/lib/openvswitch/ovn:/run/ovn:shared,z
- /var/log/containers/openvswitch:/var/log/openvswitch:z
- /var/log/containers/openvswitch:/var/log/ovn:z
- /var/lib/kolla/config_files/ovn_controller.json:/var/lib/kolla/config_files/config.json:ro

tripleo_ovn_controller_tls_volumes:
- /etc/pki/tls/certs/:/etc/pki/tls/certs/
- /etc/pki/tls/private/:/etc/pki/tls/private/

# Set external_id data from provided variables
tripleo_ovn_ovs_external_ids:
  hostname: "{{ ansible_facts['fqdn'] }}"
  ovn-bridge: '{{ tripleo_ovn_bridge }}'
  ovn-bridge-mappings: "{{ tripleo_ovn_bridge_mappings|join(', ') }}"
  ovn-encap-ip: '{{ tripleo_ovn_encap_ip }}'
  ovn-encap-type: '{{ tripleo_ovn_encap_type }}'
  ovn-match-northd-version: true
  ovn-monitor-all: true
  ovn-openflow-probe-interval: '{{ tripleo_ovn_of_probe_interval }}'
  ovn-remote: "{% set db_addresses = [] %}{% for host in tripleo_ovn_dbs %}{{ db_addresses.append([tripleo_ovn_protocol,\
    \ host, tripleo_ovn_sb_server_port] | join(':')) }}{% endfor %}{{ db_addresses\
    \ | join(',') }}"
  ovn-remote-probe-interval: '{{ tripleo_ovn_remote_probe_interval }}'
  rundir: /var/run/openvswitch

# Set openvswitch other_config.
tripleo_ovn_ovs_other_config:
  vlan-limit: 0

Molecule Scenarios

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

Scenario: default

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      centos:
        ansible_python_interpreter: /usr/bin/python3
Example default playbook
- name: Converge
  hosts: all
  gather_facts: true
  become: true
  tasks:
  - include_role:
      name: tripleo_ovn
    vars:
      tenant_ip: '{{ ansible_host }}'
      tripleo_ovn_dbs:
      - '{{ ansible_host }}'