Hi,

no unfortunatelyou cannot pass any variable to the dynamic inventory, it will 
be called automatically by ansible with the host or list argument. 
The only way you have is either setting env variables or having a config file. 



--
Andrea

----- Reply message -----
From: "Ritesh Shetty" <[email protected]>
To: <[email protected]>
Subject: [ansible-project] Can the -i option of dynamic inventory accept a json 
directly instead of a executable file ?
Date: Thu, May 14, 2015 7:23 PM

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.
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 [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/5554f445.aa56b40a.47c0.fffffcc5SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to