Ansible A MySQL module is required: for Python 2.7 either PyMySQL, or MySQL-python, or for Python 3.X mysqlclient or PyMySQL

1、ansible mysql_db模板 报错信息

"msg": "A MySQL module is required: for Python 2.7 either PyMySQL, or MySQL-python, or for Python 3.X 
mysqlclient or PyMySQL. Consider setting ********_python_interpreter to use the intended Python version.
"

2、解决方法

# 被控制主机需要安装此包,才可以解决
yum install MySQL-python

 

posted @ 2023-03-02 13:27  小粉优化大师  阅读(387)  评论(0编辑  收藏  举报