Role - tripleo-packages¶
Role Documentation¶
Welcome to the “tripleo-packages” role documentation.
Role Defaults¶
This section highlights all of the defaults and variables set within the “tripleo-packages” role.
# All variables intended for modification should place placed in this file.
# All variables within this role should have a prefix of "tripleo_packages"
# Dictionary packing service data
tripleo_packages_service_data: {}
# Mapping of service_name -> network name. Typically set
# via parameter_defaults in the resource registry. This
# mapping overrides those in ServiceNetMapDefaults.
tripleo_packages_service_net_map: {}
tripleo_packages_default_passwords: {}
# Role name on which the service is applied
tripleo_packages_role_name: ''
# Parameters specific to the role
tripleo_packages_role_parameters: {}
# Mapping of service endpoint -> protocol. Typically set
# via parameter_defaults in the resource registry.
tripleo_packages_endpoint_map: {}
# Set to true to enable package installation at deploy time
tripleo_packages_enable_package_install: false
# Allowed values: 'tripleo-repos' or 'custom-script'
tripleo_packages_fast_forward_repo_type: tripleo-repos
tripleo_packages_fast_forward_repo_args:
tripleo_repos:
ocata: -b ocata current
pike: -b pike current
queens: -b queens current
tripleo_packages_fast_forward_custom_repo_script_content: |
#!/bin/bash
set -e
echo "If you use FastForwardRepoType 'custom-script' you have to provide the upgrade repo script content."
echo "It will be installed as /root/ffu_upgrade_repo.sh on the node"
echo "and passed the upstream name (ocata, pike, queens) of the release as first argument"
exit 1
# Use Leapp for operating system upgrade
tripleo_packages_upgrade_leapp_enabled: true
# Print debugging output when running Leapp
tripleo_packages_upgrade_leapp_debug: true
# Skip RHSM when running Leapp in development/testing.
tripleo_packages_upgrade_leapp_devel_skip_rhsm: false
# Timeout (seconds) for the OS upgrade phase via Leapp
tripleo_packages_upgrade_leapp_reboot_timeout: 1800
# Command or script snippet to run on all overcloud nodes to
# initialize the upgrade process. E.g. a repository switch.
tripleo_packages_upgrade_init_command: ''
# Common commands required by the upgrades process. This should not
# normally be modified by the operator and is set and unset in the
# major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
# environment files.
tripleo_packages_upgrade_init_common_command: ''
tripleo_packages_short_bootstrap_node_name: ''
# Exclude specific packages from update
tripleo_packages_exclude_from_update:
# Ansbile cannot upgrade itself as it will cause the current execution to fail.
# https://github.com/ansible/ansible/issues/56636
- ansible
tripleo_release: "{{ release | default('queens') }}"
Molecule Scenarios¶
Molecule is being used to test the “tripleo-packages” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.
- Driver: podman
- Driver: podman
- Driver: podman
- Driver: podman
Scenario: update¶
Molecule Inventory¶
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
Example update playbook¶
- name: Converge
hosts: all
vars:
step: 3
tripleo_packages_exclude_from_update:
- ansible
- redhat-release
tasks:
- name: Import TripleO packages role
include_role:
name: tripleo-packages
tasks_from: update.yml
Scenario: ffu¶
Molecule Inventory¶
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
Example ffu playbook¶
- name: Converge
hosts: all
vars:
step: 3
tasks:
- name: Import TripleO packages role
include_role:
name: tripleo-packages
tasks_from: fast_forward_upgrade.yml
- name: Import TripleO packages role
include_role:
name: tripleo-packages
tasks_from: fast_forward_post_upgrade.yml
Scenario: default¶
Molecule Inventory¶
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
Example default playbook¶
- name: Converge
hosts: all
roles:
- role: tripleo-packages
Scenario: external_upgrade¶
Molecule Inventory¶
hosts:
all:
hosts:
ubi8:
ansible_python_interpreter: /usr/bin/python3
Example external_upgrade playbook¶
- name: Converge
hosts: all
vars:
step: 1
tasks:
- name: Import TripleO packages role
include_role:
name: tripleo-packages
tasks_from: external_upgrade.yml