# mysql module not found on mac by Ansible

**URL:** <https://forum.ansible.com/t/mysql-module-not-found-on-mac-by-ansible/18717>\
**Category:** Ansible Project\
**Created:** [July 9, 2015, 4:04pm UTC](https://forum.ansible.com/t/mysql-module-not-found-on-mac-by-ansible/18717 "2015-07-09T16:04:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Scancella](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@John\_Scancella](https://forum.ansible.com/u/John_Scancella)\
**Post date:** [July 9, 2015, 4:04pm UTC](https://forum.ansible.com/t/mysql-module-not-found-on-mac-by-ansible/18717/1 "2015-07-09T16:04:02Z")

</div>

Hello,

Sorry if this has already been answered, but after much googling I couldn’t find the answer. I am trying to create a database in mysql using Ansible. I see from the documentation that Ansible needs to have the MySQL-python module installed. I did this in my ansible-playbook using

> > - name: install MySQL-python module
> 
> > pip: name=MySQL-python
> 
> > become: yes

But I still get the error:

> TASK: [install MySQL-python module] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

> ok: [localhost]

> 

> TASK: [create chronam database] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

> failed: [localhost] =\> (item=chronam) =\> {“failed”: true, “item”: “chronam”}

> msg: the python mysqldb module is required

> failed: [localhost] =\> (item=chronam\_test) =\> {“failed”: true, “item”: “chronam\_test”}

> msg: the python mysqldb module is required

> 

> FATAL: all hosts have already failed – aborting

What am I doing wrong? Why can’t Ansible see that it is installed? This is being run on a Mac (OS X 10.9.5)

Thanks

John
