Role - tripleo_derived_parameters

Role Documentation

Welcome to the “tripleo_derived_parameters” role documentation.

Role Defaults

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

# All variables intended for modification should be placed in this file.

# All variables within this role should have a prefix of "tripleo_tripleo_derived_parameters"
tripleo_tripleo_derived_parameters_debug: '{{ ((ansible_verbosity | int) >= 2) | bool
  }}'
tripleo_plan_name: Overcloud
tripleo_role_name: undefined
tripleo_environment_parameters: {}
tripleo_heat_resource_tree: {}

Molecule Scenarios

Molecule is being used to test the “tripleo_derived_parameters” 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:
      ubi8:
        ansible_python_interpreter: /usr/bin/python3
Example default playbook
- name: Converge
  hosts: all
  vars:
    tripleo_get_flatten_params: "{{ lookup('file', '../mock_params') | from_yaml }}"
    tripleo_role_list: "{{ lookup('file', '../mock_roles') | from_yaml }}"
    tripleo_all_nodes: "{{ lookup('file', '../mock_ironic_all') | from_yaml }}"
    hci_profile_config: "{{ lookup('file', '../mock_hci_profile_config') | from_yaml\
      \ }}"
    hci_profile: default
    num_phy_cores_per_numa_node_for_pmd: 1
    hw_data_required: true
  tasks:
  - name: Derive params for each role
    include_role:
      name: tripleo_derived_parameters
    vars:
      tripleo_plan_name: overcloud
      tripleo_role_name: '{{ outer_item }}'
      tripleo_environment_parameters: '{{ tripleo_get_flatten_params.stack_data.environment_parameters
        }}'
      tripleo_heat_resource_tree: '{{ tripleo_get_flatten_params.stack_data.heat_resource_tree
        }}'
      baremetal_data: "{{ lookup('file', '../mock_baremetal_{{ outer_item }}') | from_yaml\
        \ }}"
    loop: '{{ tripleo_role_list.roles }}'
    loop_control:
      loop_var: outer_item