Ensure public volume type option is evaluated as a boolean
To ensure that all boolean types supported by ansible are evaluated, and to ensure thhat it is evaluated as a boolean, we use the bool filter. Related-Bug: 1804438 Change-Id: I76ee77958d7e1bf94089b917ac064db4e97d1ad9
This commit is contained in:
parent
495e79de79
commit
91ea6c7361
@ -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 }}" {% if not item.value.public|default(True) %} --private {% endif %} "{{ 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)) | bool %} --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 }}" {% if not item.value.public|default(True) %} --private {% endif %} "{{ 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)) | bool %} --private {% endif %} "{{ evtype }}"
|
||||
fi
|
||||
{% endfor %}
|
||||
args:
|
||||
|
Loading…
x
Reference in New Issue
Block a user