---
- name: Fail if load balancer members not set
  fail:
    msg: >-
      Ceph RadosGW load balancer configuration is enabled
      (enable_ceph_rgw_loadbalancer) but no HAProxy members are configured.
      Have you set ceph_rgw_hosts?
  when:
    - enable_ceph_rgw_loadbalancer | bool
    - ceph_rgw_haproxy_members | length == 0
