Skip to content

Commit

Permalink
feat: add filter for lvm backends (#669)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Carter <[email protected]>
  • Loading branch information
cloudnull authored Jan 26, 2025
1 parent 6d37646 commit 74f3b6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ansible/playbooks/deploy-cinder-volumes-reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@
{% for backend in cinder_backend_name.split(',') %}
{% set default_backend = (_kubernetes_cinder_etc_secret.resources[0].data['backends.conf'] | b64decode | community.general.from_ini)[backend] %}
{% set network_interface = hostvars[inventory_hostname][cinder_storage_network_interface]['ipv4']['address'] | default(ansible_default_ipv4.address) %}
{% set network_interface_secondary = hostvars[inventory_hostname][cinder_storage_network_interface_secondary]['ipv4']['address'] %}
{% set _ = default_backend.__setitem__("target_ip_address", network_interface) %}
{% if (custom_multipath | bool) %}
{% set _ = default_backend.__setitem__("iscsi_secondary_ip_addresses", network_interface_secondary) %}
{% if ("lvm" in backend) and (custom_multipath | bool) %}
{% set network_interface_secondary = hostvars[inventory_hostname][cinder_storage_network_interface_secondary]['ipv4']['address'] %}
{% set _ = default_backend.__setitem__("iscsi_secondary_ip_addresses", network_interface_secondary) %}
{% endif %}
{% set _ = rendered_backend.__setitem__(backend, default_backend) %}
{% endfor %}
Expand Down

0 comments on commit 74f3b6e

Please sign in to comment.