diff --git a/group_vars/all/ceph.yml b/group_vars/all/ceph.yml index 4a3dc9264c..0ce8a71331 100644 --- a/group_vars/all/ceph.yml +++ b/group_vars/all/ceph.yml @@ -30,3 +30,9 @@ fetch_directory: /etc/openstack_deploy/ceph-fetch/ # exists. we handle the log dir creation so this is not something we need # ceph-common to prepare for us. rbd_client_directories: false + +# The OSA ceph_client role does not support loading IPs from an inventory group, +# so we have to feed it a list of IPs +ceph_mons: "{{ groups[mon_group_name] + | map('extract', hostvars, 'ansible_host') + | list }}" diff --git a/tests/roles/bootstrap-host/tasks/prepare_ceph.yml b/tests/roles/bootstrap-host/tasks/prepare_ceph.yml index cb2623b63c..efaba66b61 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_ceph.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_ceph.yml @@ -54,9 +54,6 @@ content: | --- devices: {{ ceph_create_loopback.results | map(attribute='stdout') | list | to_yaml | trim }} - # The OSA ceph_client role does not support loading IPs from an inventory group, - # so we have to feed it a list of IPs - ceph_mons: "{% raw %}[ {% for host in groups[mon_group_name] %}'{{ hostvars[host]['ansible_host'] }}'{% if not loop.last %},{% endif %}{% endfor %} ]{% endraw %}" cinder_backends: "RBD": volume_driver: cinder.volume.drivers.rbd.RBDDriver