Network action recreates port every time it is run (with same parameters)
Summary
Shade os_port
module used for [port creation] (tasks/network_port_create.yml) does not work idempotently in certain conditions - when port that is being created gets address from subnetwork pool.
Steps to reproduce
openstack_ports:
- name: "my-port"
network: "my-network"
addresses: ["my-subnetwork"]
Expected behavior
Port should not be recreated when role is used with the same parameters.
Actual behavior
Each time openstack
role (network
action) is run (with exactly same parameters) port is recreated, getting different IP address.
Possible fixes
Run os_port
only when port does not already exists (port name
check).