While creating a playbook for mysql, I cam across the following error while creating database on an AWS Amazon Linux instance.
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required.”}
To correct it, we need to install the dependencies and add them to the playbook as required below
– name: “Installing pip”
yum:
name: python2-pip
state: present
– name: “Installing pymysql for dependency”
pip:
name: pymysql
state: present
Recent Comments