We want to use the ec2_eip module to associate an EIP with the instance
that should have it (a proxy server, say), but only if the EIP is
currently unassociated; if we accidentally bring up another instance that
looks like the proxy server in the relevant ways, we don't want it to
steal the EIP from the first one.
Looking at https://docs.aws.amazon.com/cli/latest/reference/ec2/associate-address.html,
I see that there are --allow-reassociation and --no-allow-reassociation
options to control this.
Looking at https://docs.ansible.com/ansible/ec2_eip_module.html, it looks
like the Ansible ec2_eip module doesn't already have this.
Looking at https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateAddress.html,
it looks like the AllowReassociation request parameter could control this,
so adding support for this to ec2_eip, e.g. via a new optional
allow_reassociation parameter, seems like it'd be pretty straightforward.
Does this seem like a good approach? If so, I'll try to do it, unless
anyone else would rather. :^)
-Josh (jbs@care.com)
This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.