43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
---
|
|
# Copyright 2022 Red Hat, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
- name: Retrieve roles list
|
|
tripleo_overcloud_role_list:
|
|
register: role_list
|
|
|
|
- name: Retrieve roles data
|
|
tripleo_overcloud_role_show:
|
|
role_name: "{{ item }}"
|
|
loop: "{{ role_list.role_list }}"
|
|
register: roles_data
|
|
|
|
- name: Get defined sevices
|
|
set_fact:
|
|
defined_services: "{{ roles_data.results | community.general.json_query('[*].role_detail.ServicesDefault') |
|
|
flatten | unique | map('split', '::') | map('last') }}"
|
|
|
|
- name: Check for deprecated services
|
|
set_fact:
|
|
deprecated_services_in_roles: "{{ deprecated_service_list | intersect(defined_services) }}"
|
|
|
|
- name: Fail if deprecated service list isn't empty
|
|
fail:
|
|
msg: >
|
|
Following services are marked as deprecated and should be removed
|
|
from roles data before upgrade:
|
|
{{ deprecated_services_in_roles }}
|
|
when: deprecated_services_in_roles
|