Re: [ansible-project] Ansible commands are not working in a fresh Ubuntu installation

992 views
Skip to first unread message

Benjamin Redling

unread,
Mar 22, 2016, 10:40:32 AM3/22/16
to ansible...@googlegroups.com
On 03/22/2016 01:33, Gaya wrote:
> The installation was successful (I also tried an upgrade later). However
> for some commands I run like "ansible -v", I get the following error and it
> displays the help.
>
> ERROR! Missing target hosts

Maybe you missed the first line were it shows you the syntax:
$ ansible
Usage: ansible <host-pattern> [options]
...


> I had the same error for "ansible --list-hosts all". Then I enabled a host
> entry in /etc/ansible/hosts, and that command is working, showing the host
> I enabled.

Have you read the fine manual?
http://docs.ansible.com/ansible/intro_getting_started.html


> I am new to Ansible and following a guide that was based on Ansible 1.9.*.
> I understand that the current version is 2.*. I tried to Google for a
> solution but couldn't find anything useful.

A solution for what? It's all fine.
The only problem is: you have to create a proper inventory file.
s. link to the docs

Regards,
Benjamin
--
FSU Jena | JULIELab.de/Staff/Benjamin+Redling.html
vox: +49 3641 9 44323 | fax: +49 3641 9 44321
Reply all
Reply to author
Forward
0 new messages