kadamwhite/wpapi.local

Cannot create MySQL dbs or users

Closed this issue · 1 comments

I think I have an order of operations (or logical) issue in my mysql role tasks file. This is the output I get from vagrant provision:

TASK: [mysql | update mysql root password for all root accounts] ************** 
failed: [vagrant] => (item=ansible-vagrant) => {"failed": true, "item": "ansible-vagrant"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
failed: [vagrant] => (item=127.0.0.1) => {"failed": true, "item": "127.0.0.1"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
failed: [vagrant] => (item=::1) => {"failed": true, "item": "::1"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
failed: [vagrant] => (item=localhost) => {"failed": true, "item": "localhost"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/kadam/playbook.retry

vagrant                    : ok=14   changed=2    unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

If I move the my.cnf task up above the root password task, I get this error instead:

TASK: [mysql | update mysql root password for all root accounts] ************** 
failed: [vagrant] => (item=ansible-vagrant) => {"failed": true, "item": "ansible-vagrant"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
failed: [vagrant] => (item=127.0.0.1) => {"failed": true, "item": "127.0.0.1"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
failed: [vagrant] => (item=::1) => {"failed": true, "item": "::1"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials
failed: [vagrant] => (item=localhost) => {"failed": true, "item": "localhost"}
msg: unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials

FATAL: all hosts have already failed -- aborting