Hi,
Just filed https://github.com/ansible/ansible/issues/19972
“The ec2_eni module does not create a new ENI and instead updates the description of an existing ENI that matches its other args. This is important for the cases when we don’t know the IP address nor want to attach it to an instance and just want to create an ENI.”
…and was looking at a possible fix.
I found the relevant commit: https://github.com/ansible/ansible/commit/f8314c3e618c4050f8e957c780f66523111076c8
It does make me wonder if the change in behaviour (excluding the description and security groups from what identifies an ENI) wasn’t intentional. See find_eni().
I’m happy to contribute a fix but would like input from Filipe and others on what makes more sense:
- include back description and security_groups attributes in the find_eni filters;
- instead allow for a state=created that expects the ID and IP address to be omitted and creates or fails but doesn’t update;
- do nothing?
Thanks,
Vasco