Idempotent is one of those frequently misused words. Mathematically it basically means F(x) = F(F(x)) for all x. Calling the same thing twice should return the thing that you got when you called it the first time.
For this reason, we don't frequently use this word to describe bugs about things not doing what you'd suspect, or even if it's just reporting changes that don't happen. As such, I'd rather get down to the root of the problem. It seems if you are asking for an EIP and don't specify which one, you're probably asking for a new one. You seem to think that asking for an EIP should not give you a new one, because the instance already has one. This may imply a new mode flag (defaulting to the present behavior) should possibly exist for the module. What do others think? On Wed, Oct 29, 2014 at 4:59 PM, erewh0n <[email protected]> wrote: > Depending on your use case, ec2_eip is not idempotent. I would like to > attach a new EIP to an instance *iff* the instance doesn't already have an > EIP attached. > > Currently, the module operates in two modes: > > 1. if you don't specify an existing EIP address, the module will > attach a new arbitrary EIP regardless of whether the instance already has > one attached (not idempotent). > 2. if you do specify an existing EIP address, then the module will > attach that EIP *iff* the EIP is not attached to any instance. > > It seems like case (1) should be idempotent and assume that an instance > with an already-attached EIP requires no change. > > Thoughts? > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/15cd891c-5a40-4f1a-996b-4bae04c63c1a%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/15cd891c-5a40-4f1a-996b-4bae04c63c1a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwCKZ-c%3D9nuE7sXo9Tn8KHZ9wdLTO6x_LwjEOOzut68XA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
