Skip to content

check if exactly one matching port exists returns incorrect fail message

Summary

check if exactly one matching port exists returns incorrect fail message

Steps to reproduce

case 1 (multiple ports)

  • create multiple openstack ports with same name
  • try to create floating ip assigned to port

case 2 (missing port)

  • try to create floating ip assigned to not existing port

Expected behavior

case 1 (multiple ports)

Message that there is multiple ports with same name.

case 2 (missing port)

Message that there is no port with given name

Actual behavior

case 1 (multiple ports)

Message that there is no port with given name

case 2 (missing port)

Message that there is multiple ports with same name.

Relevant logs and/or screenshots

N/A

Possible fixes

Swap tarnary parameters in

msg: "port {{ _openstack_floating_ip.port }} {{ (_openstack_floating_ip_port_in_ports | ternary('does not exist', 'used multiple times')) }}"
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information