I want to set up nginx HA with keepalived and I’m preparing an ansible role for this purpose in an openstack environment (I’m using ansible 2). I would like to update the server port, that is already existing, to add allowed_address_pairs with a single pair (the virtual IP and the host mac address).
I have two problems:
- How to get the port_id (to update the port with os_port). I cannot get this id in any facts.
- How to get the information of that port in order to update only the allowed_address_pairs.
I know how to implement it in shell but it would be nice to use only ansible commands. Any hint how to achieve it?
Thanks in advance.