web analytics

fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required.”}

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

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>