Merge "vips: assert shows what we're testing and when"

This commit is contained in:
Zuul
2023-02-21 16:39:04 +00:00
committed by Gerrit Code Review

View File

@@ -56,15 +56,17 @@
# Configuration and validation of network host networking. # Configuration and validation of network host networking.
- name: Validate Kolla Ansible API address configuration - name: Validate Kolla Ansible API address configuration
fail: assert:
msg: > that:
- hostvars[inventory_hostname][item.var_name] is defined
- hostvars[inventory_hostname][item.var_name] | length > 0
fail_msg: >
The Kolla Ansible variable {{ item.var_name }} The Kolla Ansible variable {{ item.var_name }}
({{ item.description }}) is invalid. Value: ({{ item.description }}) is invalid. Value:
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}". "{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
when: when:
- groups['network'] | length > 0 - groups['network'] | length > 0
- item.required | bool - item.required | bool
- hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name]
with_items: with_items:
- var_name: "kolla_internal_vip_address" - var_name: "kolla_internal_vip_address"
description: "Internal API VIP address" description: "Internal API VIP address"