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