tripleo-validations/roles/check_rhsm_version/molecule/rhsm_mismatch/converge.yml

44 lines
1.3 KiB
YAML

---
# Copyright 2020 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: Converge
hosts: all
tasks:
- name: detect wrong rhsm version
block:
- name: run validation with wrong rhsm version
include_role:
name: "check_rhsm_version"
vars:
check_rhsm_version_command: "echo 'Release: 8.4'"
check_rhsm_version_expected: "8.2"
rescue:
- name: Clear host errors
meta: clear_host_errors
- name: Status message
debug:
msg: "Detected RHSM version mismatch!"
- name: End play
meta: end_play
- name: Fail the test
fail:
msg: |
The rhsm version mismatch should have detected but it wasn't..