No. I don't have idea in specifying it as dynamic inventory script or 
custom facts module.

Could you please provide me an examples or documentation.

On Monday, February 29, 2016 at 8:31:00 PM UTC+5:30, Tom Bamford wrote:
>
> On 29 Feb 2016, at 9:41 AM, Dinesh Sekar <[email protected] <javascript:>> 
> wrote: 
> > 
> > Yes. If I give the arguments as below, then it would be normal variables 
> or global variables. 
> > 
> >  ansible-playbook -i hosts xxxx.yaml --extra-vars 
> '{"management_interface":{"int": "em0","ip": "192.168.56.3"}}' 
> > 
> > But I'm looking for an option in ansible-playbook where we could pass 
> the host variables specific to the particular host as follows. 
> > 
> >  ansible-playbook -i hosts xxxx.yaml --extra-vars 
> '{"hostvars['host1']":{"management_interface":{"int": "em0","ip": 
> "192.168.56.3"}}}' 
> > 
> > The content in hosts file is as below: 
> > 
> > [vdc1-host1] 
> > host1 
> > 
> > [vdc1-host2] 
> > host2 
> > 
> > [vdc1:children] 
> > vdc1-host1 
> > vdc1-host2 
> > 
> > [sites:children] 
> > vdc1 
> > 
> > [all:children] 
> > sites 
> > 
> > Please let me know if you have any queries. 
>
> Have you considered other ways of specifying that information, such as a 
> dynamic inventory script, or a custom facts module? 
>
> Tom

-- 
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/65e711f6-adff-4109-bdfd-45e9221ca1a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to