tripleo-heat-templates/deployment/undercloud/undercloud-upgrade.yaml

85 lines
2.6 KiB
YAML

heat_template_version: rocky
description: >
Upgrade a non-containerized undercloud to a containerized undercloud.
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
SkipRhelEnforcement:
default: 'false'
description: Whether to avoid or not RHEL/OSP policies enforcement on Red Hat.
Mainly for CI purpose. It shouldn't matter on other distributions
where it's disabled in the role. Set to true to skip the enforcement.
type: string
outputs:
role_data:
description: Role data for the TripleO Undercloud Upgrade service.
value:
service_name: undercloud_upgrade
config_settings: {}
deploy_steps_tasks: []
docker_config: {}
kolla_config: {}
puppet_config:
config_volume: ''
step_config: ''
config_image: ''
upgrade_tasks:
- name: Enforce RHOSP rules regarding subscription.
include_role:
name: tripleo_redhat_enforce
vars:
skip_rhel_enforcement: {get_param: SkipRhelEnforcement}
when:
- step|int == 0
- ansible_distribution == 'RedHat'
- not (skip_rhel_enforcement | bool)
- name: Special treatment for OpenvSwitch
tripleo_ovs_upgrade:
when:
- step|int == 2
register: ovs_upgrade
- name: Always ensure the openvswitch service is enabled and running after upgrades
service:
name: openvswitch
enabled: yes
state: started
when:
- step|int == 2
- ovs_upgrade.changed|bool
# Exclude ansible until https://github.com/ansible/ansible/issues/56636
# is available
- name: Update all packages
when: step|int == 3
yum:
name: '*'
state: latest
exclude: ansible