Hello,

What about adding an EIP to the instance(s)? 

Because that changes the game completely making the registered ec2 
instances info outdated (at least the IP-related one).

How about cycling through Route53 with those EIPs? Has anyone done that 
successfully? Don't want to hijack this thread, but I find this rather 
relevant. 

I know some would indicate the ec2_facts module, registering the output 
from ec2_eip or using the add_host module but I couldn't do it in any way 
so even a pseudo-code would be appreciated.

Thanks !

On Thursday, 21 November 2013 18:42:31 UTC+1, Renaud Guerin wrote:
>
> Hello,
>
> The EC2 module's docs show how to create several instances at once using 
> the "count" variable, and register the results into another variable 
> ("ec2").
>
> You can then iterate on the created instances and do stuff (like add them 
> to an inventory group) using "with_items: ec2.instances"
>
> However, I can't figure out how to do the following :
>
> 1) Have the user provide a "names" list ( { "web1", "web2", "web3" } ). Or 
> better yet, a naming prefix ("web"), a count (3) and a start index (1). 
> 2) Create them using the ec2 module, register results into "ec2" to keep 
> precious info like ec2.instances.public_dns_name.
> 3) Here's the tricky bit : add a route53 DNS entry that CNAMEs together 
> each entry in the "names" list with the public_dns_name values in 
> "ec2.instances".
>
> I don't believe with_nested will help with 3) and you can't walk through 
> the 2 lists together side by side either by having several with_items: 
> statements, correct ?
>
> Short of adding the feature to the ec2 module, how would you do that ? 
>
> Can you do something like :
> - include add_instance.yml
>   with_items: names
>
> and then inside add_instance.yml use the ec2 module with count=1 and 
> create the DNS entries from there ?
>
> Thanks !
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3c66bacc-9ba0-4817-97a0-8a621486be0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to