Monday, January 11, 2016

Ubuntu - error running ansible - ImportError: No module named runner

Ansible is a popular tool managing complex deployment environments in Linux society. It makes your life as developer much easier. However, from time to time, especially if you install lots of additional software on your Ubuntu machine, you might encounter this problem while running ansible:

 ImportError: No module named runner

This error can be verified by issuing the following command in your Ubuntu terminal:

ansible --version

Traceback (most recent call last):
  File "/usr/bin/ansible", line 36, in <module>
    from ansible.runner import Runner
ImportError: No module named runner

If you see such an error , you can try to locate the ansible python package in /usr/local/lib/ and remove it.
For example:

rm -rf /usr/local/lib/ansible-2.0.0-py2.6.egg

Here's the original thread (very nicely written by Dan Swartz):

1 comment:

  1. Dear.I am very honored to introduce a external hard drive cnet

    products to you,it is very useful and free,and professional technical support.THANK YOU !

    ReplyDelete

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...