{"action":"created","issue":{"url":"https://api.github.com/repos/roots/trellis/issues/285","labels_url":"https://api.github.com/repos/roots/trellis/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/roots/trellis/issues/285/comments","events_url":"https://api.github.com/repos/roots/trellis/issues/285/events","html_url":"https://github.com/roots/trellis/issues/285","id":98634415,"number":285,"title":"Non Root User on AWS Errors on Provisioning server.yml","user":{"login":"BrandonShutter","id":2022885,"avatar_url":"https://avatars.githubusercontent.com/u/2022885?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandonShutter","html_url":"https://github.com/BrandonShutter","followers_url":"https://api.github.com/users/BrandonShutter/followers","following_url":"https://api.github.com/users/BrandonShutter/following{/other_user}","gists_url":"https://api.github.com/users/BrandonShutter/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonShutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonShutter/subscriptions","organizations_url":"https://api.github.com/users/BrandonShutter/orgs","repos_url":"https://api.github.com/users/BrandonShutter/repos","events_url":"https://api.github.com/users/BrandonShutter/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonShutter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/roots/trellis/milestones/1","html_url":"https://github.com/roots/trellis/milestones/1.0.0","labels_url":"https://api.github.com/repos/roots/trellis/milestones/1/labels","id":1199079,"number":1,"title":"1.0.0","description":"","creator":{"login":"austinpray","id":2192970,"avatar_url":"https://avatars.githubusercontent.com/u/2192970?v=3","gravatar_id":"","url":"https://api.github.com/users/austinpray","html_url":"https://github.com/austinpray","followers_url":"https://api.github.com/users/austinpray/followers","following_url":"https://api.github.com/users/austinpray/following{/other_user}","gists_url":"https://api.github.com/users/austinpray/gists{/gist_id}","starred_url":"https://api.github.com/users/austinpray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinpray/subscriptions","organizations_url":"https://api.github.com/users/austinpray/orgs","repos_url":"https://api.github.com/users/austinpray/repos","events_url":"https://api.github.com/users/austinpray/events{/privacy}","received_events_url":"https://api.github.com/users/austinpray/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":7,"state":"open","created_at":"2015-07-08T16:33:53Z","updated_at":"2015-08-02T23:23:37Z","due_on":"2015-08-31T05:00:00Z","closed_at":null},"comments":5,"created_at":"2015-08-02T20:25:41Z","updated_at":"2015-08-04T23:44:09Z","closed_at":null,"body":"I have an Ubuntu box on AWS.  Setting `admin_user: ubuntu` in `group_vars/all` results in an error when the `Determine remote user task` runs.\r\n\r\nRather than Trellis trying to use `ubuntu` over `root` it errors out with ssh garbage.\r\n\r\nHere's the output of `-vvvv`:\r\n\r\n```\r\nBrandons-MacBook-Pro:ansible shutter$ ansible-playbook -i hosts/production server.yml -vvvv\r\n```\r\n\r\n    PLAY [Determine Remote User] ************************************************** \r\n    \r\n    TASK: [remote-user | Determine whether to connect as root or admin_user] ****** \r\n    <127.0.0.1> REMOTE_MODULE command ssh -o PasswordAuthentication=no  \"echo root\" || echo ubuntu #USE_SHELL\r\n    <127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1438381915.22-77758919300933 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1438381915.22-77758919300933 && echo $HOME/.ansible/tmp/ansible-tmp-1438381915.22-77758919300933']\r\n    <127.0.0.1> PUT /var/folders/lf/878x4xqx5q71w08fpj496mnh0000gn/T/tmpnwxIKk TO /Users/shutter/.ansible/tmp/ansible-tmp-1438381915.22-77758919300933/command\r\n    <127.0.0.1> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /Users/shutter/.ansible/tmp/ansible-tmp-1438381915.22-77758919300933/command; rm -rf /Users/shutter/.ansible/tmp/ansible-tmp-1438381915.22-77758919300933/ >/dev/null 2>&1']\r\n    ok: [52.3.121.253 -> 127.0.0.1] => {\"changed\": false, \"cmd\": \"ssh -o PasswordAuthentication=no root@52.3.121.253 \\\"echo root\\\" || echo ubuntu\", \"delta\": \"0:00:11.073787\", \"end\": \"2015-07-31 18:32:06.360790\", \"rc\": 0, \"start\": \"2015-07-31 18:31:55.287003\", \"stderr\": \"\", \"stdout\": \"Please login as the user \\\"ubuntu\\\" rather than the user \\\"root\\\".\", \"stdout_lines\": [\"Please login as the user \\\"ubuntu\\\" rather than the user \\\"root\\\".\"], \"warnings\": []}\r\n    \r\n    TASK: [remote-user | Set remote user for each host] *************************** \r\n    <52.3.121.253> ESTABLISH CONNECTION FOR USER: shutter\r\n    ok: [52.3.121.253] => {\"ansible_facts\": {\"ansible_ssh_user\": \"Please login as the user \\\"ubuntu\\\" rather than the user \\\"root\\\".\"}}\r\n    \r\n    PLAY [WordPress Server - Install LEMP Stack with PHP 5.6 and MariaDB MySQL] *** \r\n    \r\n    GATHERING FACTS *************************************************************** \r\n    <52.3.121.253> ESTABLISH CONNECTION FOR USER: Please login as the user \"ubuntu\" rather than the user \"root\".\r\n    <52.3.121.253> REMOTE_MODULE setup\r\n    <52.3.121.253> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=\"/Users/shutter/.ansible/cp/ansible-ssh-%h-%p-%r\" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=Please login as the user \"ubuntu\" rather than the user \"root\". -o ConnectTimeout=10 52.3.121.253 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1438381926.4-222011237551738 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1438381926.4-222011237551738 && echo $HOME/.ansible/tmp/ansible-tmp-1438381926.4-222011237551738'\r\n    fatal: [52.3.121.253] => SSH Error: command-line line 0: garbage at end of line; \"login\".\r\n    It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.\r\n    \r\n    TASK: [common | Validate Ansible version] ************************************* \r\n    FATAL: no hosts matched or all hosts have already failed -- aborting\r\n    \r\n    \r\n    PLAY RECAP ******************************************************************** \r\n               to retry, use: --limit @/Users/shutter/server.retry\r\n    \r\n    52.3.121.253               : ok=2    changed=0    unreachable=1    failed=0   \r\n    \r\n    Brandons-MacBook-Pro:ansible shutter$ ssh ubuntu@52.3.121.253\r\n    Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)\r\n\r\n\r\nYou can see the error AWS is giving is trying to use `root` instead of `ubuntu`.\r\n\r\n`ESTABLISH CONNECTION FOR USER: Please login as the user \"ubuntu\" rather than the user \"root\".`"},"comment":{"url":"https://api.github.com/repos/roots/trellis/issues/comments/127797726","html_url":"https://github.com/roots/trellis/issues/285#issuecomment-127797726","issue_url":"https://api.github.com/repos/roots/trellis/issues/285","id":127797726,"user":{"login":"swalkinshaw","id":295605,"avatar_url":"https://avatars.githubusercontent.com/u/295605?v=3","gravatar_id":"","url":"https://api.github.com/users/swalkinshaw","html_url":"https://github.com/swalkinshaw","followers_url":"https://api.github.com/users/swalkinshaw/followers","following_url":"https://api.github.com/users/swalkinshaw/following{/other_user}","gists_url":"https://api.github.com/users/swalkinshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/swalkinshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swalkinshaw/subscriptions","organizations_url":"https://api.github.com/users/swalkinshaw/orgs","repos_url":"https://api.github.com/users/swalkinshaw/repos","events_url":"https://api.github.com/users/swalkinshaw/events{/privacy}","received_events_url":"https://api.github.com/users/swalkinshaw/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T23:44:09Z","updated_at":"2015-08-04T23:44:09Z","body":"@fullyint looks good. Want to do a PR?"}}