kolla-ansible/ansible/roles/prechecks/tasks/inventory_checks.yml
Erik Berg 984612f084
loadbalancer: Use assert on checks for readability
assert will also fail when we're not meeting the conditions, makes
clear what we're actually testing, and isn't listed as a skipped task
when the condition is ok.

Change-Id: Ia72c7052d7f9b8c7d86d74a15dcd9e003178972b
2023-01-09 21:47:10 +01:00

13 lines
375 B
YAML

---
- name: Checking loadbalancer group
assert:
that:
- groups['loadbalancer'] is defined
- groups['loadbalancer'] | length > 0
fail_msg: >-
Inventory's group loadbalancer does not exist or it is empty.
Please update inventory, as haproxy group was renamed
to loadbalancer in the Xena release.
when:
- enable_loadbalancer | bool