{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1215","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1215/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1215/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1215/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1215","id":71636782,"number":1215,"title":"mysql_user module fails without config_file set","user":{"login":"jeffbryner","id":566889,"avatar_url":"https://avatars.githubusercontent.com/u/566889?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbryner","html_url":"https://github.com/jeffbryner","followers_url":"https://api.github.com/users/jeffbryner/followers","following_url":"https://api.github.com/users/jeffbryner/following{/other_user}","gists_url":"https://api.github.com/users/jeffbryner/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbryner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbryner/subscriptions","organizations_url":"https://api.github.com/users/jeffbryner/orgs","repos_url":"https://api.github.com/users/jeffbryner/repos","events_url":"https://api.github.com/users/jeffbryner/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbryner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/P2","name":"P2","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-28T16:25:23Z","updated_at":"2015-04-30T12:46:22Z","closed_at":null,"body":"Attempting to create a user without specifying a config_file results in the following stack trace (forced by removing generic exception catching and using the ansible-examples wordpress deploy) : \r\n\r\nTASK: [wordpress | Create WordPress database user] ****************************\r\nfailed: [<ipaddress here>] => {\"failed\": true, \"parsed\": false}\r\nTraceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1430237848.07-140306729185464/mysql_user\", line 2183, in <module>\r\n    main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1430237848.07-140306729185464/mysql_user\", line 420, in main\r\n    cursor = connect(module, login_user, login_password, config_file)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1430237848.07-140306729185464/mysql_user\", line 196, in connect\r\n    if os.path.exists(config_file):\r\n  File \"/usr/lib64/python2.6/genericpath.py\", line 18, in exists\r\n    st = os.stat(path)\r\nTypeError: coercing to Unicode: need string or buffer, NoneType found\r\n\r\nSetting a config_file (even to one that doesn't contain user info) allows this to proceed, but seems like a bug.\r\n\r\nThe original error message provided by the module is incorrect and misleading: \r\nTASK: [wordpress | Create WordPress database user] ****************************\r\nfailed: [<ipaddress here>] => {\"failed\": true}\r\nmsg: unable to connect to database, check login_user and login_password are correct"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/97759749","html_url":"https://github.com/ansible/ansible-modules-core/issues/1215#issuecomment-97759749","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1215","id":97759749,"user":{"login":"juliakreger","id":5863524,"avatar_url":"https://avatars.githubusercontent.com/u/5863524?v=3","gravatar_id":"","url":"https://api.github.com/users/juliakreger","html_url":"https://github.com/juliakreger","followers_url":"https://api.github.com/users/juliakreger/followers","following_url":"https://api.github.com/users/juliakreger/following{/other_user}","gists_url":"https://api.github.com/users/juliakreger/gists{/gist_id}","starred_url":"https://api.github.com/users/juliakreger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliakreger/subscriptions","organizations_url":"https://api.github.com/users/juliakreger/orgs","repos_url":"https://api.github.com/users/juliakreger/repos","events_url":"https://api.github.com/users/juliakreger/events{/privacy}","received_events_url":"https://api.github.com/users/juliakreger/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T12:46:22Z","updated_at":"2015-04-30T12:46:22Z","body":"Also seeing this bug, along with additional issues I'm sorting out now.  Seems like a very quick fix because None is always passed in overriding the default set in the method for the default location of the file.\r\n"}}