"so maybe a pull request against ec2_facts with the filters would get
accepted. Long run it does seem like hosts and modules need to have some
idea of state ... "

Anything applying to more than one host definitely shouldn't be done by the
facts module.




On Mon, Apr 21, 2014 at 1:54 PM, 'C. S. <cov...@yahoo.com>' via Ansible
Project <ansible-project@googlegroups.com> wrote:

> Thanks for the clarification, right, the use case and implementation are a
> bit different.  Seems like they could be combined however.
>
> On Apr 21, 2014, at 10:45 , Scott Anderson <scottanderso...@gmail.com>
> wrote:
>
> Actually, it's not the same as ec2_facts other than it returns facts about
> an instance.
>
> ec2_facts only works when run on an actual AWS instance (it calls the
> Amazon ec2 metadata servers) and it only retrieves the facts for that
> instance alone.
>
> ec2_instance_facts, on the other hand, can retrieve multiple instance
> facts at once from anywhere (I use it in a local action). It's more like
> ec2.py run for specific instances from within a playbook.
>
> Regards,
> -scott
>
> On Apr 21, 2014, at 1:39 PM, C. S. <cov...@yahoo.com> wrote:
>
> Thanks!
>
> That's interesting, your module is the same as ec2_facts just with
> filtering. And the ec2_facts module says it may add filtering in the notes.
> I think I'd agree with Michael's pov, but it looks like we've already gone
> down facts being outside the inventory module, so maybe a pull request
> against ec2_facts with the filters would get accepted. Long run it does
> seem like hosts and modules need to have some idea of state ...
>
>
> On Apr 21, 2014, at 10:10 , Scott Anderson <scottanderso...@gmail.com>
> wrote:
>
> I use this module: https://github.com/ansible/ansible/pull/6349
>
> Full disclosure: Michael believes all inventory should be done via
> inventory scripts; I respectfully disagree. :-) I find ec2.py to be very
> slow (20 seconds to refresh the cache with a small number of instances, for
> example) and prefer querying inventory directly in the script itself for
> many use cases.
>
> Regards,
> -scott
>
> On Monday, April 21, 2014 12:29:03 PM UTC-4, cove_s wrote:
>>
>> Hi folks,
>>
>> We're trying to implement a system where we can power environments on and
>> off AWS when they're not in use. However the ec2 inventory module excludes
>> instances that are not in a running state.  It seems like adding an option
>> to the ec2 module to include stopped instances would work, but then I guess
>> ansible would need a corresponding option to call the module with to
>> include the stopped instances. Which seems a it hacky...
>>
>> Maybe ansible needs a notion of host state? Any thoughts?
>>
>> Thx!
>>
>> -cs
>>
>>
> --
> 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/e10fe6c9-e2b9-4ddb-9797-71c0602ea7c2%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/e10fe6c9-e2b9-4ddb-9797-71c0602ea7c2%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 a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/mwLbfIe-TBA/unsubscribe.
> To unsubscribe from this group and all its topics, 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/94C96347-186E-47B4-A58A-AA135A9ED736%40yahoo.com<https://groups.google.com/d/msgid/ansible-project/94C96347-186E-47B4-A58A-AA135A9ED736%40yahoo.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 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/40FAF301-F370-4BB9-BF9D-3C688F952D61%40gmail.com<https://groups.google.com/d/msgid/ansible-project/40FAF301-F370-4BB9-BF9D-3C688F952D61%40gmail.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 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/9B55B687-ABEB-4F32-B0FE-BAFD2315A0A4%40yahoo.com<https://groups.google.com/d/msgid/ansible-project/9B55B687-ABEB-4F32-B0FE-BAFD2315A0A4%40yahoo.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 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%2BnsWgw%2BoWszwyfZknmPbOFKoCxMfabZ43Y1nHZhnixJMv%3DEFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to