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

Problems with Tower Module in ansible virtualvenv #140

Open
AStuntman opened this issue Aug 15, 2019 · 1 comment

Comments

@AStuntman
Copy link

@AStuntman AStuntman commented Aug 15, 2019

Hi,
I have an issue with playing playbook with tower module in ansible virtualvenv. If i use ANSIBLE_PYTHON_INTERPRETER = '/opt/rh/rh-python36/root/usr/bin/python' in settings.py, i have no problems with running tower module in playbook, but i have problems like in issue #109 when trying to use apt module in playbook.
In my virtualenv i have installed all modules, which i find in rp-phyton package.

adal (1.2.2)
amqp (2.4.2)
ansible (2.8.3)
ansible-runner (1.3.4)
ansible-tower-cli (3.3.6)
ansiconv (1.0.0)
asgi-amqp (1.1.3)
asgiref (1.1.2)
asn1crypto (0.24.0)
attrs (19.1.0)
autobahn (19.5.1)
Automat (0.7.0)
azure-common (1.1.23)
azure-keyvault (1.1.0)
azure-nspkg (3.0.2)
billiard (3.6.0.0)
boto (2.47.0)
celery (4.3.0)
certifi (2019.6.16)
cffi (1.12.3)
channels (1.1.8)
chardet (3.0.4)
Click (7.0)
colorama (0.4.1)
constantly (15.1.0)
cryptography (2.7)
daphne (1.3.0)
defusedxml (0.5.0)
Django (2.2.4)
django-auth-ldap (1.7.0)
django-cors-headers (2.4.0)
django-crum (0.7.2)
django-extensions (2.0.0)
django-jsonfield (1.2.0)
django-oauth-toolkit (1.1.3)
django-pglocks (1.0.2)
django-polymorphic (2.0.2)
django-qsstats-magic (0.7.2)
django-radius (1.3.3)
django-solo (1.1.3)
django-split-settings (0.3.0)
django-taggit (0.22.2)
djangorestframework (3.9.4)
djangorestframework-yaml (1.0.3)
docutils (0.15.2)
future (0.17.1)
httpretty (0.9.6)
hyperlink (19.0.0)
idna (2.8)
ijson (2.4)
incremental (17.5.0)
inflect (2.1.0)
irc (16.2)
isodate (0.6.0)
jaraco.classes (2.0)
jaraco.collections (2.0)
jaraco.functools (2.0)
jaraco.itertools (4.4.2)
jaraco.logging (2.0)
jaraco.stream (2.0)
jaraco.text (3.0)
Jinja2 (2.10.1)
jsonpickle (1.2)
jsonschema (2.6.0)
kombu (4.5.0)
lockfile (0.12.2)
lxml (4.3.3)
MarkupSafe (1.1.1)
more-itertools (7.0.0)
msgpack-python (0.5.6)
msrest (0.6.9)
msrestazure (0.6.1)
netaddr (0.7.19)
ntlm-auth (1.3.0)
oauthlib (3.1.0)
pexpect (4.7.0)
pip (9.0.1)
pkgconfig (1.5.1)
prometheus-client (0.6.0)
psutil (5.6.2)
psycopg2 (2.7.3.2)
ptyprocess (0.6.0)
pyasn1 (0.4.5)
pyasn1-modules (0.2.5)
pycparser (2.19)
pygerduty (0.37.0)
Pygments (2.4.0)
PyHamcrest (1.9.0)
PyJWT (1.7.1)
pyparsing (2.4.0)
pyrad (2.1)
pysnow (0.7.9)
PySocks (1.7.0)
python-daemon (2.2.3)
python-dateutil (2.8.0)
python-ldap (3.2.0)
python-logstash (0.4.6)
python-magic (0.4.15)
python-memcached (1.59)
python-radius (1.0)
python3-openid (3.1.0)
python3-saml (1.4.0)
pytz (2019.2)
pyvmomi (6.7.1.2018.12)
pywinrm (0.3.0)
PyYAML (5.1.1)
requests (2.22.0)
requests-futures (0.9.7)
requests-ntlm (1.1.0)
requests-oauthlib (1.2.0)
setuptools (41.1.0)
six (1.12.0)
slackclient (1.1.2)
social-auth-app-django (2.1.0)
social-auth-core (3.0.0)
sqlparse (0.3.0)
tacacs-plus (1.0)
tempora (1.14)
twilio (6.10.4)
Twisted (19.2.0)
txaio (18.8.1)
typing (3.7.4)
urllib3 (1.25.3)
uWSGI (2.0.17)
vine (1.3.0)
virtualenv (15.1.0)
websocket-client (0.56.0)
wheel (0.29.0)
xmlsec (1.3.3)
xmltodict (0.12.0)
zope.interface (4.6.0)


This is error when i am trying to use tower module from ansible virtualenv.


An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: invalid syntax
17
fatal: [host]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1565886663.0441616-156341458520105/AnsiballZ_tower_host.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1565886663.0441616-156341458520105/AnsiballZ_tower_host.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1565886663.0441616-156341458520105/AnsiballZ_tower_host.py\", line 49, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/tmp/ansible_tower_host_payload_M3qCR3/__main__.py\", line 69, in <module>\n  File \"/tmp/ansible_tower_host_payload_M3qCR3/ansible_tower_host_payload.zip/ansible/module_utils/ansible_tower.py\", line
@MrMEEE

This comment has been minimized.

Copy link
Owner

@MrMEEE MrMEEE commented Aug 28, 2019

Have you tried adding the apt module to your virtualenv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.