Re: [ansible-project] Dynamic inventory cache

2016-06-01 Thread Brian Coca
in 2.1 ansible supports a yaml inventory file format, this can read json
but the format is not the same as the 'dynamic script' output.

--
Brian Coca

-- 
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/CACVha7e-dByG6c2-3nyxNSB9%2BbHcrBCAsE1fnzYfHSpXfso42A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Dynamic inventory cache

2016-06-01 Thread André Cruz

On Thursday, May 26, 2016 at 3:40:58 PM UTC+1, Brian Coca wrote:
>
> You've hit the nail on the head! We do have plans to make a 'inventory 
> cache' part of Ansible itself, currently its up to each script and of 
> course we have different implementations and some that don't implement any.
>

While we don't have a global inventory cache, I'm saving the dynamic inv 
script output to a file, and using it between ansible runs. In order for 
this to work I have a hack which is an executable script that the only 
thing it does it "cat output.json". Is there a better way? Can ansible read 
directly the hosts from the json file or ir there a way to convert this 
json to the format ansible understands?

Thanks,
André

>

-- 
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/0012f394-4040-4d11-88bc-fca42ea5ad64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Dynamic inventory cache

2016-05-26 Thread Brian Coca
You've hit the nail on the head! We do have plans to make a 'inventory
cache' part of Ansible itself, currently its up to each script and of
course we have different implementations and some that don't implement any.

On Thu, May 26, 2016 at 10:30 AM, André Cruz  wrote:

> Since ansible already supports caching of facts shouldn't this also be a
> job of ansible itself? Otherwise each dynamic inventory plugin will
> implement it in a different way or not implement it at all...
> --
>
Brian Coca

-- 
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/CACVha7ciC%3D-yz6uZxwgGTyChoGnH6_LAwN79h2T%2B4gtZDdrxMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Dynamic inventory cache

2016-05-26 Thread André Cruz
Since ansible already supports caching of facts shouldn't this also be a
job of ansible itself? Otherwise each dynamic inventory plugin will
implement it in a different way or not implement it at all...

On Tuesday, 24 May 2016, Matt Hite  wrote:

> I believe it would be up to the dynamic inventory script to implement the
> caching functionality.
>
> On Tue, May 24, 2016 at 9:55 AM, André Cruz  > wrote:
>
>> Hello all.
>>
>> I'm using the Azure RM dynamic inventory script, which although it works
>> fine, is very slow.
>>
>> Is it possible to cache its results and reuse them on another invocation?
>> Can I just dump the output of the script (JSON) and load it?
>>
>> Thank you and best regards,
>> André
>>
>> --
>> 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/2bb40eb4-a75d-4280-9332-8faa2f060fba%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/4_UxdmUx3vQ/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/CAFOdRHJhtKDn%3DQ%3DbAsCi2V_bxnaK8a49PiMBqeOFiTaR%2B6fTYQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
André Cruz

-- 
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/CAB9t8Hp6hHX3svKZXEO11GwRBseG9pTnJ97vNXJNM9U%3DdHKreA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Dynamic inventory cache

2016-05-24 Thread Matt Hite
I believe it would be up to the dynamic inventory script to implement the
caching functionality.

On Tue, May 24, 2016 at 9:55 AM, André Cruz  wrote:

> Hello all.
>
> I'm using the Azure RM dynamic inventory script, which although it works
> fine, is very slow.
>
> Is it possible to cache its results and reuse them on another invocation?
> Can I just dump the output of the script (JSON) and load it?
>
> Thank you and best regards,
> André
>
> --
> 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/2bb40eb4-a75d-4280-9332-8faa2f060fba%40googlegroups.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 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/CAFOdRHJhtKDn%3DQ%3DbAsCi2V_bxnaK8a49PiMBqeOFiTaR%2B6fTYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Dynamic inventory cache

2016-05-24 Thread André Cruz
Hello all.

I'm using the Azure RM dynamic inventory script, which although it works 
fine, is very slow.

Is it possible to cache its results and reuse them on another invocation? 
Can I just dump the output of the script (JSON) and load it?

Thank you and best regards,
André

-- 
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/2bb40eb4-a75d-4280-9332-8faa2f060fba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.