Localhost will work regardless of the actual name of the computer you're 
running on, it's literally 127.0.0.1. 
If you have trying to do something against a node which is not the node 
you're running ansible from, you shouldn't name that node localhost.



On Thursday, August 18, 2016 at 7:21:13 PM UTC+2, RoboWhite wrote:
>
> But this is the way we have to give hostname?  
>
> On Thursday, 18 August 2016 22:18:14 UTC+5:30, pixel fairy wrote:
>>
>> sounds like a vagrant issue. ask here: 
>> https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/vagrant-up
>>
>> On Thursday, August 18, 2016 at 9:41:38 AM UTC-7, FISH wrote:
>>>
>>> Hi,
>>>
>>> Thanks to all.
>>>
>>> I created the setup of “vagrant with cent OS”. 
>>>
>>> When I do configuration, I could see the below error after done with 
>>> “ping” command.
>>>
>>>
>>> [root@localhost ansible]# ansible example -m ping -u vagrant
>>> localhost | UNREACHABLE! => {
>>>     "changed": false,
>>>     "msg": "Failed to connect to the host via ssh.",
>>>     "unreachable": true
>>> }
>>> [root@localhost ansible]#
>>>
>>> My configuration file is like this:
>>>
>>> ## db-[99:101]-node.example.com
>>> [example]
>>> localhost
>>>
>>> and my hostname is like this
>>>
>>> [root@localhost ansible]# hostname
>>> localhost.localdomain
>>> [root@localhost ansible]#
>>>
>>> Can you help me on fixing this. What are the steps required to finish 
>>> this.
>>> ​
>>>
>>> --
>>>
>>>
>>>
>>>

-- 
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/31cbe1e9-7dea-4aa9-9c3a-4bc62cbcf847%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to