Problems with Ubuntu install: no modules detected

2,966 views
Skip to first unread message

Bence Takács

unread,
Dec 20, 2014, 5:31:33 AM12/20/14
to ansible...@googlegroups.com
Following the official Ubuntu guide (http://docs.ansible.com/intro_installation.html#latest-releases-via-apt-ubuntu) I experienced the following problem:

$ ansible --version
ansible 1.9
  configured module search path = None
$ ansible all -m ping
nas | FAILED => module ping not found in configured module paths.  Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem.

Where could I find the default modules like 'ping'?

The /usr/share/ansible directory is empty,
The /etc/ansible directory contains only the ansible.cfg and the hosts file (I already modified the latter and added my 'nas').
The ~/.ansible cotains only an empty directory called cp

If I run the suggested command, it says:

$ git submodule update --init --recursive
fatal: Not a git repository (or any of the parent directories): .git

So: where are the default modules or how can I get them? :-)

I'm on Ubuntu 14.04

Regards:
   Bence


titlei...@gmail.com

unread,
Dec 20, 2014, 5:26:27 PM12/20/14
to ansible...@googlegroups.com
I just built a Ubuntu 14.04 VM, and went through the same procedures. It installed Ansible 1.8.2, not 1.9.

user@ubuntu:~$ uname -a
Linux ubuntu 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu:~$ dpkg -l | grep -i ansible
ii  ansible                             1.8.2-1ppa~trusty             all          A radically simple IT automation platform
user@ubuntu:~$

Check /usr/share/pyshared/ansible, thats where everything was installed for me.  Maybe try reinstalling?

Jay

Bence Takács

unread,
Dec 21, 2014, 12:29:24 PM12/21/14
to ansible...@googlegroups.com
Now I see what is the main issue: first I tried to install ansible from source (I found a howto about that first...)

And it has no 'remove' or 'uninstall' build target. So I just deleted the directories I found...

Now I tried some stronger cleanup:
sudo apt-get remove ansible
sudo pip uninstall ansible
 
I also have some remainings:
$ whereis ansible
ansible: /etc/ansible /usr/local/bin/ansible

How should I remove those?

Regards:
   Bence

Bence Takács

unread,
Dec 21, 2014, 12:46:01 PM12/21/14
to ansible...@googlegroups.com
I deleted the remaining files from /usr/local/bin and reinstalled ansible with apt-get again, but something is wrong:

$ ansible all -m ping
bash: /usr/local/bin/ansible: No such file or directory

Any tips?

titlei...@gmail.com

unread,
Dec 21, 2014, 1:02:12 PM12/21/14
to ansible...@googlegroups.com
Seems like you still need some more cleanup to do.  Apt-get remove it, then remove everyone ansible on your system, including any .ansible.cfg or .ansible directories, and anything left in /usr/local and /etc.  And then do a fresh install from scratch and see if that helps.  Make sure you don't have any ANSIBLE environment variables set the old paths too.

Jay

Bence Takács

unread,
Dec 21, 2014, 1:10:49 PM12/21/14
to ansible...@googlegroups.com
According to my understanding I exactly did everything you suggested in the previous step.

Then installed it again.

The result is:

$ ansible all -m ping
bash: /usr/local/bin/ansible: No such file or directory

But it seems that this works:
sudo ansible all -m ping
... or at least it initiates the ssh session but does not find the keys... since it is looking for them in '/root/.ssh' instead of my user's directory.
Is that the desired behaviour, that ansible could be run only by root (on Ubuntu)?



Bence Takács

unread,
Dec 21, 2014, 1:16:43 PM12/21/14
to ansible...@googlegroups.com
Ok, after deleting the form /etc/ansible/ansible.cfg
and reinstalling again, everything is working with the 'normal' user, without sudo

Thanks


2014. december 20., szombat 11:31:33 UTC+1 időpontban Bence Takács a következőt írta:

titlei...@gmail.com

unread,
Dec 21, 2014, 2:21:42 PM12/21/14
to ansible...@googlegroups.com
Sounds like you had an old config file pointed at the source install.  Glad it's working now.

Jay

Bence Takács

unread,
Dec 22, 2014, 3:16:49 AM12/22/14
to ansible...@googlegroups.com
Thanks for your help!

Merry Christmas ;-)
Reply all
Reply to author
Forward
0 new messages