Re: [ansible-project] Iterating through a list of names to create EC2 instances

2016-08-31 Thread gabriel . laden
Thank you very much for answering the question. Gabriel On Wednesday, October 29, 2014 at 2:02:19 AM UTC-7, Sankalp Khare wrote: > > Hi Renaud, > > I totally get what you are looking to achieve. Perhaps you've achieved it > already in the past year. Assuming that you are happy with specifying

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2014-10-29 Thread Sankalp Khare
I must also add that I've got a central group_vars/all file from which I pull all the variables like region, instance types, environment specific load balancer names, etc. On Wednesday, 29 October 2014 04:02:19 UTC-5, Sankalp Khare wrote: > > Hi Renaud, > > I totally get what you are looking to

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2014-10-29 Thread Sankalp Khare
Hi Renaud, I totally get what you are looking to achieve. Perhaps you've achieved it already in the past year. Assuming that you are happy with specifying a start index = x and a count = N to produce machines with names containing x, x+1, x+2, ... x+N, I think the following playbook example wil

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-28 Thread Peter Sankauskas
One more example to clear up uniqueness: 3 instances tagged Name=foo, SSH into 2nd instance: ansible-ec2 ssh --name foo -u ec2-user -n 2 (sorted by public DNS name, I think) On Wednesday, November 27, 2013 9:36:12 AM UTC-8, Renaud Guerin wrote: > > Nice tool ! > > But your ssh example show

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-27 Thread Renaud Guérin
Nice tool ! But your ssh example shows how a unique name is still unavoidable sometimes, be it Tags or DNS based. If I left instances with their EC2 birth names, I couldn’t just make up « ansible-ec2 ssh --name web1 » when I need to log into a web server, I’d have to « ansible-ec2 list » first

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-27 Thread Peter Sankauskas
Actually yes. You can tag AWS resources and find them using tags. For example, an Amazon Linux instance with tag Name=foo could be SSHed into using ansible-ec2 ssh --name foo -u ec2-user You can find the code here: https://github.com/pas256/ansible-ec2 It uses Ansible's EC2 inventory plugin

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-27 Thread Renaud Guérin
Hi Peter, Very interesting talk and this is probably the better approach, thanks. You do need to address individual servers from time to time though : ssh’ing into them to debug something, for instance. In this case, finding and copying the public_dns_name for a box sounds like a pain, and a b

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-25 Thread Peter Sankauskas
Just to belabor the point: https://www.youtube.com/watch?v=lQUdjPBJX5c On Sunday, November 24, 2013 10:34:39 AM UTC-8, Peter Sankauskas wrote: > > Hi Renaud, > > People that have been using AWS for a while don't really use it this way, > or at least, they shouldn't. Treat servers like cattle,

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-24 Thread Peter Sankauskas
Hi Renaud, People that have been using AWS for a while don't really use it this way, or at least, they shouldn't. Treat servers like cattle, not pets. If you haven't yet, take a look at AutoScaling Groups: http://aws.amazon.com/autoscaling/ ... and think about how to architect your applicatio

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-23 Thread Renaud Guérin
Thanks Michael, I know (and mentioned) I’ll need to use the route53 module, that’s not the difficulty here. I did some more research and it looks like ‘with_together' is what I was looking for. If anyone is looking to do the same (it's a quite common provisioning pattern) : - provide an « inst

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-23 Thread Michael DeHaan
http://ansibleworks.com/docs/modules.html#route53 On Thu, Nov 21, 2013 at 2:14 PM, Renaud Guérin wrote: > On 21 novembre 2013 at 18:47:46, James Tanner > (tanner...@gmail.com) > wrote: > > > The EC2 module's docs show how to create several instances at once > > using the "count" variable, and r

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-21 Thread Renaud Guérin
On 21 novembre 2013 at 18:47:46, James Tanner (tanner...@gmail.com) wrote: > 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

[ansible-project] Iterating through a list of names to create EC2 instances

2013-11-21 Thread Renaud Guerin
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" Howe

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2013-11-21 Thread James Tanner
On 11/21/2013 12:42 PM, 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 inventor