I launch 10 instances using with_items:

ec2:
 count:1
 tags: ....
with_items: vms_array

I can't use count more than 1, because every instance can have different
ami, differrent type, different tags. So I need to launch them one by one.
Is there any way to get public_ip / public_hostame from instance, launched
with wait=no?

On Sat, Feb 21, 2015 at 10:10 PM, Dan Vaida <[email protected]> wrote:

> Hmm… There must be something else happening there. I’m launching 5
> instances using the count parameter in about 30s.
> I must say, there are some gotchas while using the cloud modules in
> regards to the serial parameter but I don’t think that’s the case here.
> Anyhow, the documentation page of the ec2 module has plenty of code
> examples: http://docs.ansible.com/ec2_module.html
> If that is not enough, take a look at this:
> https://github.com/danvaida/ansible-aws-squid3/blob/master/ec2.yml
> Hope this helps.
>
> > On Feb 21, 2015, at 7:21 PM, Alexey Wasilyev <[email protected]>
> wrote:
> >
> > When I start instances with wait=yes - they start one by one, ~1
> instance per minute. I need to launch 10 instances, so it tooks 10 minutes.
> >
> > Can you explain your idea with register with few lines of code?
> >
> > On Saturday, February 21, 2015 at 3:11:31 PM UTC+3, Dan Vaida wrote:
> > What do you mean by "slow"?
> > Just use register and in a next task you can get the IP of the launched
> instances by parsing instancesfrom the registered variable.
> >
> > On Wednesday, 18 February 2015 12:46:46 UTC+1, Alexey Wasilyev wrote:
> > Hello!
> >
> > Is there any way to launch multiple different vm's in parallel?
> > When I set wait=yes to the ec2 module - vm's are launched one by one,
> which can be very slow. In case of wait=yes - vm's are launched rather
> faster, but I can't get they ip/hostname for the next steps.
> >
> > Any ideas?
> >
> > --
> > You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> > To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/5O7b_2ra5Vk/unsubscribe.
> > To unsubscribe from this group and all its topics, 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/d8487d8a-f196-42d8-a1a8-1e242510db84%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/5O7b_2ra5Vk/unsubscribe.
> To unsubscribe from this group and all its topics, 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/4F9A1363-234B-4DE0-AB68-134308721333%40gmail.com
> .
> 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/CANMXT8snNQoe7mErHik1z71n1YebB0Y%3Dz5bRKFe0hUJ8Uko-NA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to