diff --git a/doc/source/configure-cinder.rst b/doc/source/configure-cinder.rst index 3022a740..3d07c547 100644 --- a/doc/source/configure-cinder.rst +++ b/doc/source/configure-cinder.rst @@ -628,6 +628,20 @@ the desired qos spec dictionary. consumer: front-end write_iops_sec: 100 +Configure cinder to create a private volume type +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default, a define cinder-backend will create a public volume type. +In order to create a private volume type, add the variable ``public`` +and set it to ``false``. If it is set to ``true`` or not set at all +the volume type created will be public. + +.. code-block:: yaml + + cinder_backends: + private_type: + public: false + Shared storage and synchronized UID/GID ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/releasenotes/notes/os_cinder-private-volume-type-9b2cc92c6c74c277.yaml b/releasenotes/notes/os_cinder-private-volume-type-9b2cc92c6c74c277.yaml new file mode 100644 index 00000000..f3e10e54 --- /dev/null +++ b/releasenotes/notes/os_cinder-private-volume-type-9b2cc92c6c74c277.yaml @@ -0,0 +1,5 @@ +--- +features: + - Deployers can now define a cinder-backend volume type + explicitly private or public with option ``public`` + set to true or false. diff --git a/tasks/cinder_backends.yml b/tasks/cinder_backends.yml index d3c1d101..28466339 100644 --- a/tasks/cinder_backends.yml +++ b/tasks/cinder_backends.yml @@ -41,7 +41,7 @@ . {{ ansible_env.HOME }}/openrc CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}" if ! {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then - {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" "{{ item.key }}" + {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not item.value.public|default(True) %} --private {% endif %} "{{ item.key }}" fi args: executable: /bin/bash @@ -54,7 +54,7 @@ CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (cinder_service_internaluri_insecure | bool)) | ternary('--insecure','') }}" {% for evtype in item.value.extra_volume_types %} if ! {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type show "{{ evtype }}"; then - {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" "{{ evtype }}" + {{ cinder_bin }}/openstack ${CLI_OPTIONS} volume type create --property volume_backend_name="{{ item.value.volume_backend_name }}" {% if not item.value.public|default(True) %} --private {% endif %} "{{ evtype }}" fi {% endfor %} args: