No module named ansible.runner

2,286 views
Skip to first unread message

skinnedknuckles

unread,
Oct 17, 2014, 9:44:20 PM10/17/14
to ansible...@googlegroups.com
Centos 7
Ansible 1.8
Python 2.7
there are some redundant entries in my environment path but I don't see how that would cause this problem
PATH is /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/bin:/usr/sbin:/bin:/sbin:/home/username/.local/bin:/home/username/bin:/etc/ansible:/etc/ansible/bin:/usr/bin/python

Every time I try to run ansible I get

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

I'm not sure if this is a problem with python or ansible but it seems like something very basic.  I've dug around the internet and all I found was http://michaelheap.com/ansible-importerror-no-module-named-ansible-playbook/

Any tips would be appreciated.

J Dav

unread,
Oct 18, 2014, 5:01:00 PM10/18/14
to ansible...@googlegroups.com
I've had this come up before. The solution for me was to check then fix the permissions of the Python libraries/packages. Which were nonexecutable when the error was present. Think it may have to do with customized umask settings.

Michael Leigh

unread,
Jul 8, 2015, 8:45:37 AM7/8/15
to ansible...@googlegroups.com
Did this get resolved by doing this? I have python 2.7 with ubuntu 14.04 and have just come up against this error. 

skinnedknuckles

unread,
Jul 8, 2015, 2:47:02 PM7/8/15
to ansible...@googlegroups.com
I can't say for sure but I do remember a python guy helping me modify some file permissions so it certainly could have worked.  Sorry I can't be more certain.

Japneet Singh

unread,
Jun 12, 2017, 9:09:28 AM6/12/17
to Ansible Project
Hi, i am facing this same error. Were you able to resolve it?

Brian Coca

unread,
Jun 12, 2017, 9:22:39 AM6/12/17
to Ansible Project
ansible.runner was removed in 2.0, it only applies to older versions
of Ansible. The docs show how to use the new API
http://docs.ansible.com/ansible/dev_guide/developing_api.html#python-api-2-0
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages