{"action":"created","issue":{"url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/issues/13","repository_url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql","labels_url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/issues/13/comments","events_url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/issues/13/events","html_url":"https://github.com/geerlingguy/ansible-role-mysql/pull/13","id":53014568,"number":13,"title":"More correctly and automatically support running the role as a user other than root","user":{"login":"jimbocoder","id":2030693,"avatar_url":"https://avatars.githubusercontent.com/u/2030693?v=3","gravatar_id":"","url":"https://api.github.com/users/jimbocoder","html_url":"https://github.com/jimbocoder","followers_url":"https://api.github.com/users/jimbocoder/followers","following_url":"https://api.github.com/users/jimbocoder/following{/other_user}","gists_url":"https://api.github.com/users/jimbocoder/gists{/gist_id}","starred_url":"https://api.github.com/users/jimbocoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimbocoder/subscriptions","organizations_url":"https://api.github.com/users/jimbocoder/orgs","repos_url":"https://api.github.com/users/jimbocoder/repos","events_url":"https://api.github.com/users/jimbocoder/events{/privacy}","received_events_url":"https://api.github.com/users/jimbocoder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/labels/needs%20work","name":"needs work","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-12-29T01:14:36Z","updated_at":"2016-04-11T04:51:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/pulls/13","html_url":"https://github.com/geerlingguy/ansible-role-mysql/pull/13","diff_url":"https://github.com/geerlingguy/ansible-role-mysql/pull/13.diff","patch_url":"https://github.com/geerlingguy/ansible-role-mysql/pull/13.patch"},"body":"I use a special sudo user to run ansible, rather than a root user.  Since Ansible modules like *mysql_user* read credentials from `$HOME/.my.cnf` but the role tasks could be in sudo mode, the modules are always trying to read from `/root/.my.cnf` regardless of the actual ansible user or `mysql_user_home` rolevar.  This works great when you happen to be using the root user anyway, but otherwise, problems.\r\n\r\nThis hopes to address that."},"comment":{"url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/issues/comments/208162287","html_url":"https://github.com/geerlingguy/ansible-role-mysql/pull/13#issuecomment-208162287","issue_url":"https://api.github.com/repos/geerlingguy/ansible-role-mysql/issues/13","id":208162287,"user":{"login":"jimbocoder","id":2030693,"avatar_url":"https://avatars.githubusercontent.com/u/2030693?v=3","gravatar_id":"","url":"https://api.github.com/users/jimbocoder","html_url":"https://github.com/jimbocoder","followers_url":"https://api.github.com/users/jimbocoder/followers","following_url":"https://api.github.com/users/jimbocoder/following{/other_user}","gists_url":"https://api.github.com/users/jimbocoder/gists{/gist_id}","starred_url":"https://api.github.com/users/jimbocoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimbocoder/subscriptions","organizations_url":"https://api.github.com/users/jimbocoder/orgs","repos_url":"https://api.github.com/users/jimbocoder/repos","events_url":"https://api.github.com/users/jimbocoder/events{/privacy}","received_events_url":"https://api.github.com/users/jimbocoder/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T04:51:02Z","updated_at":"2016-04-11T04:51:02Z","body":"As the OP, none of the responses here fully solve the initial perceived deficiency, and at the same time my suggestions do not address all of the responses. Since this issue is getting a bit old, and because the upgrade path between Ansible 1.x and 2.0 is really quite smooth (compared to almost any other increment in the major version number) my personal suggestion is to concur with @drzraf and push for 2.0 compliance."}}