Skip to content

Commit 74f3b6e

Browse files
authored
feat: add filter for lvm backends (#669)
Signed-off-by: Kevin Carter <[email protected]>
1 parent 6d37646 commit 74f3b6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ansible/playbooks/deploy-cinder-volumes-reference.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@
187187
{% for backend in cinder_backend_name.split(',') %}
188188
{% set default_backend = (_kubernetes_cinder_etc_secret.resources[0].data['backends.conf'] | b64decode | community.general.from_ini)[backend] %}
189189
{% set network_interface = hostvars[inventory_hostname][cinder_storage_network_interface]['ipv4']['address'] | default(ansible_default_ipv4.address) %}
190-
{% set network_interface_secondary = hostvars[inventory_hostname][cinder_storage_network_interface_secondary]['ipv4']['address'] %}
191190
{% set _ = default_backend.__setitem__("target_ip_address", network_interface) %}
192-
{% if (custom_multipath | bool) %}
193-
{% set _ = default_backend.__setitem__("iscsi_secondary_ip_addresses", network_interface_secondary) %}
191+
{% if ("lvm" in backend) and (custom_multipath | bool) %}
192+
{% set network_interface_secondary = hostvars[inventory_hostname][cinder_storage_network_interface_secondary]['ipv4']['address'] %}
193+
{% set _ = default_backend.__setitem__("iscsi_secondary_ip_addresses", network_interface_secondary) %}
194194
{% endif %}
195195
{% set _ = rendered_backend.__setitem__(backend, default_backend) %}
196196
{% endfor %}

0 commit comments

Comments
 (0)