That is very strange. The original etc/ansible/hosts file has all lines commented out.
I just added an entry like this [dummy_hosts] dummy And everything starts working perfectly with the original file. Thanks Guru On Thursday, March 12, 2015 at 11:29:59 AM UTC-7, Brian Coca wrote: > > newer ansible versions should 'just work' with localhost, any other > host you want to use should appear in inventory (default is > /etc/ansible/hosts) but you can even define in command line '-i > "hostname,"' < comma is important as it tells ansible it is a list. > > On Thu, Mar 12, 2015 at 2:27 PM, Guru Devanla <grd...@gmail.com > <javascript:>> wrote: > > Thanks Brian. > > > > I tried target but go the same error. I also tried to get rid of > variable > > entirely with the following statement > > > > - hosts: 'localhost' > > tasks: > > - name: test ping > > ping: > > > > and I still see the same error. Looks like there is some other config > file > > that is causing some issue. Note, that this is specific to a machine > and I > > am not getting this error on another machine. So, am I missing some > setting > > in /etc/ansible/hosts file? > > > > > > > > > > > > > > On Thursday, March 12, 2015 at 10:59:50 AM UTC-7, Brian Coca wrote: > >> > >> try using a variable named 'target', hosts is a keyword and can lead > >> to confusion, in general do not use variables that overlap with > >> keywords. > >> > >> > >> -- > >> 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-proje...@googlegroups.com <javascript:>. > > To post to this group, send email to ansible...@googlegroups.com > <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/81d8ac0e-e206-4b7d-ab66-ad8a95a33970%40googlegroups.com. > > > > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > 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/3c13f122-369a-4128-9374-6e9be11bd8d5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.