Skip to content
Snippets Groups Projects
Unverified Commit 83f64a7f authored by jhchong92's avatar jhchong92 Committed by GitHub
Browse files

Bugfix/cinder csi cloud config template (#7955)

* Fix invalid condition for username and password inclusion

* Use length filter to test variable conditions
parent 60853fa6
No related branches found
No related tags found
No related merge requests found
[Global]
auth-url="{{ cinder_auth_url }}"
{% if cinder_application_credential_id is not defined and cinder_application_credential_name is not defined %}
{% if cinder_application_credential_id|length == 0 and cinder_application_credential_name|length == 0 %}
username="{{ cinder_username }}"
password="{{ cinder_password }}"
{% endif %}
{% if cinder_application_credential_id is defined and cinder_application_credential_id != "" %}
{% if cinder_application_credential_id|length > 0 %}
application-credential-id={{ cinder_application_credential_id }}
{% endif %}
{% if cinder_application_credential_name is defined and cinder_application_credential_name != "" %}
{% if cinder_application_credential_name|length > 0 %}
application-credential-name={{ cinder_application_credential_name }}
{% endif %}
{% if cinder_application_credential_secret is defined and cinder_application_credential_secret != "" %}
{% if cinder_application_credential_secret|length > 0 %}
application-credential-secret={{ cinder_application_credential_secret }}
{% endif %}
region="{{ cinder_region }}"
{% if cinder_tenant_id is defined and cinder_tenant_id != "" %}
{% if cinder_tenant_id|length > 0 %}
tenant-id="{{ cinder_tenant_id }}"
{% endif %}
{% if cinder_tenant_name is defined and cinder_tenant_name != "" %}
{% if cinder_tenant_name|length > 0 %}
tenant-name="{{ cinder_tenant_name }}"
{% endif %}
{% if cinder_domain_name is defined and cinder_domain_name != "" %}
{% if cinder_domain_name|length > 0 %}
domain-name="{{ cinder_domain_name }}"
{% elif cinder_domain_id is defined and cinder_domain_id != "" %}
{% elif cinder_domain_id|length > 0 %}
domain-id ="{{ cinder_domain_id }}"
{% endif %}
{% if cinder_cacert is defined and cinder_cacert != "" %}
{% if cinder_cacert|length > 0 %}
ca-file="{{ kube_config_dir }}/cinder-cacert.pem"
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment