Replies: 1 comment
-
@acdbrn69 hello, thanks for opening the discussion!
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I am running a simple sql and always get an error
"msg": "A MySQL module is required: for Python 2.7 either PyMySQL, or MySQL-python, or for Python 3.X mysqlclient or PyMySQL. Consider setting ansible_python_interpreter to use the intended Python version."
I am running Python 3.x I checked to make sure I have the mods
ubuntu@ip-10-245-160-87:
$ pip3 freeze | grep PyMySQL$ pip3 freeze | grep mysqlclientPyMySQL==1.0.2
ubuntu@ip-10-245-160-87:
mysqlclient==2.1.1
I spec the ansible_python_interpreter in my PB
hosts: 10.245.xxx.xx
name: Snipe-IT DB
tags: t1
gather_facts: yes
become: true
collections:
tasks:
community.mysql.mysql_query:
login_db: xxx
login_user: xxxxx
login_password: XXXXXXXX
query: SELECT id FROM users
vars:
ansible_python_interpreter: /usr/bin/python3
i spec'ed it out in the hosts file:
[automation_hosts:vars]
ansible_python_interpreter=/usr/bin/python3
even the command line:
ansible-playbook sql.yml -e 'ansible_python_interpreter=/usr/bin/python3' -vvv
all with no joy
any ideas?
Thanks
W
Beta Was this translation helpful? Give feedback.
All reactions