Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"This module requires TextFSM" #169

Closed
wilmington opened this issue May 26, 2017 · 5 comments
Closed

"This module requires TextFSM" #169

wilmington opened this issue May 26, 2017 · 5 comments

Comments

@wilmington
Copy link

wilmington commented May 26, 2017

Looks like multiple people have reported this in the closed issue #94

I'm on Ubuntu 16.04.1 LTS. Python 2.7.12, Running in a virtualenv.

All packages present, can import all the modules into python. On running a play I see

FAILED! => {"changed": false, "failed": true, "msg": "This module requires TextFSM"}

issue exists with ansible 2.2 and 2.3 and with pip or manually installed gtextfsm

@wilmington
Copy link
Author

wilmington commented May 28, 2017

Success on a fresh Ubuntu 16.04.1 LTS. Python 2.7.12 build - without a virtualenv.

Checking configuration of virtualenv - will attempt to reproduce.

Same error on fresh virtualenv.

@jmorello12
Copy link

jmorello12 commented Jun 12, 2017

I have the same issue in a virtualenv with:
python 2.7.12
ansible 2.3.1.0
terminal 0.4.0
gtextfsm 0.2.1 (from pip)
textfsm 0.3.2 (from git, installed with python setup.py)
ntc-ansible 0.1.0

Edit: In an interactive Python shell from within the virtualenv, I am also able to pass the HAS_TEXTFSM check in ntc_show_command.py lines 225-234

Python 2.7.12 (default, Aug 10 2016, 08:40:47)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from clitable import CliTableError
>>> import clitable
>>> from textfsm.clitable import CliTableError
>>> import textfsm.clitable as clitable

@itdependsnetworks
Copy link
Contributor

I have updated the readme, but basically this usually happens (especially in virtualenvs) if you do not have ansible_python_interpreter set. Take a look at the Readme and follow those instructions, if that doesn't help, let us know.

@wilmington
Copy link
Author

My issue solved by adding this to my inventory

[all:vars]
ansible_python_interpreter="/usr/bin/env python"

@GGabriele
Copy link
Contributor

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants