I'm reading the inventory document
<http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups> but
can't follow this example:
Suppose you have just static IPs and want to set up some aliases that live
> in your host file, or you are connecting through tunnels. You can also
> describe hosts like this:
>
>
>
> jumper ansible_port=5555 ansible_host=192.168.1.50
>
>
Here is my */etc/ansible/hosts* file:
vm1 ansible_host=localhost ansible_connection=local
> vm2 ansible_host=192.168.104.102
>
When I tried to ping every host, I got this error message for *vm2*:
*vagrant@vm1:~$* ansible all -m ping
> vm2 | FAILED => SSH Error: ssh: Could not resolve hostname vm2: Name or
> service not known
> It is sometimes useful to re-run the command using -vvvv, which prints SSH
> debug output to help diagnose the issue.
> vm1 | success >> {
> "changed": false,
> "ping": "pong"
> }
>
How can I set an alias for static IP 192.168.104.102 ?
--
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/f1b6f349-1707-4ca9-96cd-feac2a79c866%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.