diff --git a/doc/source/configure-ceph.rst b/doc/source/configure-ceph.rst index 4c86f8c..42c78f8 100644 --- a/doc/source/configure-ceph.rst +++ b/doc/source/configure-ceph.rst @@ -159,7 +159,7 @@ configurations need to be added to the user variable file: - component: gnocchi_api package: "{{ python_ceph_packages }}" client: - - '{{ gnocchi_ceph_client }}' + - name: '{{ gnocchi_ceph_client }}' service: '{{ ceph_gnocchi_service_names }}' diff --git a/releasenotes/notes/ceph_components_format-3a947aa47ed2ff71.yaml b/releasenotes/notes/ceph_components_format-3a947aa47ed2ff71.yaml new file mode 100644 index 0000000..4b58bef --- /dev/null +++ b/releasenotes/notes/ceph_components_format-3a947aa47ed2ff71.yaml @@ -0,0 +1,13 @@ +--- + +deprecations: + - | + Format of ``client`` key inside ``ceph_extra_components`` variable has been + deprecated in favor of a mapping with one required attribute ``name``. + Having ``client`` key defined as a simple list is kept for backwards compatibility + but will be removed in future releases. + +fixes: + - | + Backwards compatibility of ``client`` key inside ``ceph_extra_components`` variable + has been fixed to support both a list and a list of mappings. diff --git a/vars/main.yml b/vars/main.yml index 4f0ef7d..b25c761 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -59,7 +59,7 @@ ceph_extra_components: [] # package: # - "{{ python_ceph_package }}" # client: -# - '{{ gnocchi_ceph_client }}' +# - name: '{{ gnocchi_ceph_client }}' # service: '{{ ceph_gnocchi_service_names }}' ceph_client_filtered_packages: |- @@ -94,7 +94,9 @@ ceph_client_filtered_clients: |- (cinder_service_backup_driver is defined and 'ceph' in cinder_service_backup_driver))) %} {% for client in comp.client %} - {% if client['enabled'] | default(true) | bool %} + {% if client is not mapping %} + {% set _ = clients.append({'name': client}) %} + {% elif client['enabled'] | default(true) | bool %} {% set _ = clients.append(client) %} {% endif %} {% endfor %}