I'm having the following issue on my Mac running

I'm trying to run an ansible-playbook and it bombs out with the following 
mysql_user command: 
mysql_user: name=mmuser password={{ mysql_root_password }} priv='*.*:ALL' 
state=present

*TASK [database : create mmuser] 
*****************************************************************************************************************
*fatal: [192.168.34.11]: FAILED! => {"changed": false, "failed": true, 
"msg": "the python mysqldb module is required"}*

I have a few versions of Python installed. Apologies, as I'm pretty new to 
Python and Ansible. I must of ran an update at some point.
I'm assuming Ansible is using 2.7.13, but /usr/bin/python is version 2.7.10.
How do I resolve this?

My environment is MacOS version 10.12.6

ansible --version

ansible 2.3.1.0

 python version = 2.7.13 |Anaconda 4.3.1 (x86_64)| (default, Dec 20 2016, 
23:05:08) [GCC 4.2.1 Stephens-MacBook-Pro:~ steve$ pip list |grep -i mysql

MySQL-python (1.2.5)

Stephens-MacBook-Pro:~ steve$ which python

/Users/steve/anaconda/bin/python

 

# ansible --version

ansible 2.3.1.0

python version = 2.7.13 |Anaconda 4.3.1 (x86_64)| (default, Dec 20 2016, 
23:05:08) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]

 

ROOT USER:

Stephens-MacBook-Pro:~ root# which python

/usr/bin/python

Stephens-MacBook-Pro:~ root# which python

/usr/bin/python

Stephens-MacBook-Pro:~ root# python --version

Python 2.7.10


pip list|grep -i mysql

MySQL-python (1.2.5)


thanks for the help


-Steve

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c29ff216-d6cc-40ec-a7e4-01f570686682%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to