62 lines
1.9 KiB
YAML
62 lines
1.9 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.
|
|
|
|
# Validate that the validation fails when undercloud.conf contains
|
|
# deprecated parameters:
|
|
#
|
|
#
|
|
# [DEFAULT]
|
|
# container_images_file= /containers-prepare-parameter.yaml
|
|
# enabled_drivers = ipxe
|
|
# masquerade_network=192.168.24.0/24
|
|
# ipxe_enabled = true
|
|
# docker_insecure_registries = 'docker.io'
|
|
# custom_env_files = /skip_rhel_release.yaml
|
|
# network_cidr = 192.168.24.0/24
|
|
# network_gateway =192.168.24.1
|
|
#
|
|
- name: Converge
|
|
hosts: all
|
|
gather_facts: false
|
|
tasks:
|
|
- name: detect deprecated parameters in undercloud conf
|
|
block:
|
|
- name: run validation check_undercloud_conf
|
|
include_role:
|
|
name: "check_undercloud_conf"
|
|
rescue:
|
|
- name: Clear host errors
|
|
meta: clear_host_errors
|
|
|
|
- name: Detect right error message
|
|
fail:
|
|
msg: "Test failed due to wrong error: {{ ansible_failed_result.msg }}"
|
|
when:
|
|
- not ansible_failed_result.msg |
|
|
regex_search("^Parameters .* are deprecated for .*$")
|
|
|
|
- name: Status message
|
|
debug:
|
|
msg: "Detected undercloud.conf configuration issue!"
|
|
|
|
- name: End play
|
|
meta: end_play
|
|
|
|
- name: Fail the test
|
|
fail:
|
|
msg: |
|
|
A configuration issue should have been detected but it wasn't..
|