---
- 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
