http://docs.ansible.com/ansible/mysql_user_module.html MySQLdbライブラリのインストール mysel_userモジュールを使用するためには下記記載のようにPythonのMySQLdbライブラリが必要。 Requirements (on host that executes module) MySQLdb http://docs.ansible.com/ansible/mysql_user_module.html#requirements-on-host-that-executes-module Amazon Linux環境だったのでYumリポジトリからインストールすることができた。 ただ、バージョンを指定する必要があった。指定がない状態だと2.6用のがインストールされる。 # yum install -y MySQL-python
![Ansibleのmysql_userモジュールを使ってrootのパスワードを変更する - chulip.org](https://cdn-ak-scissors.b.st-hatena.com/image/square/a49b3d2c6976f1b9a1e50f852bd535fc995e64c6/height=288;version=1;width=512/https%3A%2F%2Fimages-fe.ssl-images-amazon.com%2Fimages%2FI%2F61u3DDhEdnL._SL160_.jpg)