In AWX when trying to run a playbook that locally runs a python script the following error appears:
import pymssql\ImportError: No module named pymssql
however, via the command line the playbook works normally.
the python script imports some modules:
cat my_script.py
#!/usr/bin/python
import sys
import pymssql
…
the playbook makes a call in the python script
cat playbook.yml
matburt
(Matthew Jones)
3
I’m not sure why you’d try installing them in the rabbitmq container… they’ll need to be the awx_task container.
thanks for the help, I installed the pip and the two python modules that needed and worked:
docker cp get-pip.py awx_task:/get-pip.py
docker exec -it xxxxxxxxxx bash
python get-pip.py
pip install Pyvmoni
pip install pymssql
would you know which file docker file (if any) I can add these settings to this container in a new installation?
matburt
(Matthew Jones)
5
This is the file you want to modify: https://github.com/ansible/awx/blob/devel/installer/roles/image_build/templates/Dockerfile.task.j2
Follow the instructions in the installer and inventory file to build your own image from it.