Useful shortcuts for vi editor

Friday, 13 July 2018

How to solve database module error?

Action
# ansible-playbook -i myhosts example.yml -v

Error
TASK [example role : example task] *******************
fatal: [local]: FAILED! => {"changed": false, "msg": "The MySQL-python module is required."} 

Solution
# yum install MySQL-python

The other solutions related to database tasks:
# yum install python-redis (Redisdb)
# yum install python-psycopg2 (PostgreSQL)

Check it for up to date list of database modules:
https://docs.ansible.com/ansible/latest/modules/list_of_database_modules.html