Re: [ansible-project] Re: Creating Dynamic Inventory with CloudFormation Outputs

2016-06-28 Thread Stephen Granger
Just a quick response, some what self promoting but hopefully helpful.

https://github.com/ansible/ansible-modules-extras/pull/2329
cloudformation_facts module

I'd previously put together a lookup plugin (mainly through combining
others efforts)
https://github.com/ansible/ansible/pull/12880
I'm going to make the time to rewrite this using boto3 and try and get it
completed before the end of July.

This will give you the resources that were created by the cloudformation
stacks. It's also possible to use the ec2_facts,
http://docs.ansible.com/ansible/ec2_facts_module.html and  ec2_remote_facts
http://docs.ansible.com/ansible/ec2_remote_facts_module.html to get a list
of the ec2 instances and then iterate them through through the add_host
http://docs.ansible.com/ansible/add_host_module.html to add them to an
in-memory inventory.

Similar to the example here,
http://docs.ansible.com/ansible/ec2_module.html#examples

On 28 June 2016 at 03:03, Mocking Bird  wrote:

> I have the same question. Why there isn't any answer here?
>
> On Friday, June 17, 2016 at 8:25:35 PM UTC+7, divya mangotra wrote:
>>
>> I am using AWS CloudFormation to create infrastructure and the template
>> creates EC2 instances, Elasticache cluster and RDS instance. Now, I am
>> wondering as to how to use the CloudFormation outputs to create Ansible
>> Dynamic Inventory? In the static inventory files I also have *groups of
>> groups*. How do I tweak my *ec2.ini *and *ec2.py* to accomodate the same?
>>
> --
> 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/0b74b57c-0228-41bc-a2df-a520d2dcb943%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Steve

-- 
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/CA%2BemtqvBaMX5%3DXG6JOwmjZC73JB_-%2B0NQKmhKP%2BjFTvpc02SHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Creating Dynamic Inventory with CloudFormation Outputs

2016-06-28 Thread Mocking Bird
I have the same question. Why there isn't any answer here?

On Friday, June 17, 2016 at 8:25:35 PM UTC+7, divya mangotra wrote:
>
> I am using AWS CloudFormation to create infrastructure and the template 
> creates EC2 instances, Elasticache cluster and RDS instance. Now, I am 
> wondering as to how to use the CloudFormation outputs to create Ansible 
> Dynamic Inventory? In the static inventory files I also have *groups of 
> groups*. How do I tweak my *ec2.ini *and *ec2.py* to accomodate the same?
>

-- 
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/0b74b57c-0228-41bc-a2df-a520d2dcb943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.