As your test indicated, the answer is no. You could create an executable script that just cats out the JSON though.
On Thu, May 14, 2015 at 1:23 PM, Ritesh Shetty <[email protected]> wrote: > My need is to call the ansible playbook with dynamic inventory and this > inventory script needs to accept arguments . so depending on arguments the > hosts will be different. I searched through the forrum and looks like the > only option is to export variable which might not be a good idea in my > case. > So now i am trying to get the json out of a script by explicitly calling a > custom method in dynamic inventory script and then trying to send this json > to the playbook > > Can the -i option of dynamic inventory accept a json directly instead of a > executable file ? > I tried it and it doesnt work. I am using 1.8.2 > > > -- > 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/2e89f96f-a8f5-48a2-bd17-d3a8462f6751%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/2e89f96f-a8f5-48a2-bd17-d3a8462f6751%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- 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/CAD8N0v9UANQibHZZY4N%3DpgGs9S%3DQh6ZxMyqBpRd8uN5OD1Nd0w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
