I am running a 16.04 Ubuntu desktop machine using VirtualBox. This VM has Ansible 2.4.0 installed. I am trying to run an ad-hoc ansible command just to prove it works (I am doing an online course). To simulate a small server farm, I use lxc (linux containters) and have three of them running:
root@tomasz-VirtualBox:/home/tomasz/ansible# lxc-ls --fancy
NAME STATE AUTOSTART GROUPS IPV4 IPV6
db1 RUNNING 0 - 10.0.3.248 -
web1 RUNNING 0 - 10.0.3.110 -
web2 RUNNING 0 - 10.0.3.226 -
I can SSH to any of these servers, however when I try to run a one-off ansible command, for example:
root@tomasz-VirtualBox:/home/tomasz/ansible# ansible 10.0.3.248 -m ping -u ubuntu
I get the following errors, that no inventory has been matched:
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available
[WARNING]: Could not match supplied host pattern, ignoring: 10.0.3.248
[WARNING]: No hosts matched, nothing to do
I am puzzled, to be honest, and as an Ansible novice, I have no idea how to move this forward. Seems such a simple issue, have not come across any similar thing here on stackoverflow. Many thanks for any hints!