{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/comments/72256981","id":72256981,"diff_hunk":"@@ -0,0 +1,61 @@\n+#! /bin/bash\n+if ! hash virtualenvwrapper.sh 2>/dev/null; then\n+    echo \"Please install virtualenvwrapper and make sure it is in your PATH\"\n+    echo \"\"\n+    echo \"  sudo apt-get install git python-dev python-pip\"\n+    echo \"  sudo pip install virtualenv virtualenvwrapper\"\n+    return 1\n+fi\n+\n+source virtualenvwrapper.sh\n+\n+if [ ! -d ~/.virtualenvs/ansible ]; then\n+    echo \"Creating ansible virtualenv...\"\n+    mkvirtualenv ansible\n+    pip install -r ~/commcarehq-ansible/ansible/requirements.txt\n+else\n+    workon ansible\n+fi\n+\n+if ! [ -L ~/commcarehq-ansible/config -o -d ~/commcarehq-ansible/config ]; then\n+    # TODO setup permissions (add user to group?) to allow write to config repo\n+    #su ansible -c \"usermod -a -G ansible $USER\"\n+    ln -s /home/ansible/commcarehq-ansible/config ~/commcarehq-ansible/config","path":"control/init.sh","position":null,"original_position":23,"commit_id":"80aa7a0f987f8e4f6e0b17a19a50a77fdc9a6c27","original_commit_id":"728965ba412600c437bfd4c173db0caff6db1cc2","user":{"login":"snopoke","id":249606,"avatar_url":"https://avatars.githubusercontent.com/u/249606?v=3","gravatar_id":"","url":"https://api.github.com/users/snopoke","html_url":"https://github.com/snopoke","followers_url":"https://api.github.com/users/snopoke/followers","following_url":"https://api.github.com/users/snopoke/following{/other_user}","gists_url":"https://api.github.com/users/snopoke/gists{/gist_id}","starred_url":"https://api.github.com/users/snopoke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snopoke/subscriptions","organizations_url":"https://api.github.com/users/snopoke/orgs","repos_url":"https://api.github.com/users/snopoke/repos","events_url":"https://api.github.com/users/snopoke/events{/privacy}","received_events_url":"https://api.github.com/users/snopoke/received_events","type":"User","site_admin":false},"body":"yea, just need to change the aliases","created_at":"2016-07-26T14:14:03Z","updated_at":"2016-07-26T14:14:03Z","html_url":"https://github.com/dimagi/commcarehq-ansible/pull/467#discussion_r72256981","pull_request_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/comments/72256981"},"html":{"href":"https://github.com/dimagi/commcarehq-ansible/pull/467#discussion_r72256981"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467","id":78518293,"html_url":"https://github.com/dimagi/commcarehq-ansible/pull/467","diff_url":"https://github.com/dimagi/commcarehq-ansible/pull/467.diff","patch_url":"https://github.com/dimagi/commcarehq-ansible/pull/467.patch","issue_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/467","number":467,"state":"open","locked":false,"title":"Allow ansible deploy from dev account on control machine","user":{"login":"millerdev","id":464726,"avatar_url":"https://avatars.githubusercontent.com/u/464726?v=3","gravatar_id":"","url":"https://api.github.com/users/millerdev","html_url":"https://github.com/millerdev","followers_url":"https://api.github.com/users/millerdev/followers","following_url":"https://api.github.com/users/millerdev/following{/other_user}","gists_url":"https://api.github.com/users/millerdev/gists{/gist_id}","starred_url":"https://api.github.com/users/millerdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerdev/subscriptions","organizations_url":"https://api.github.com/users/millerdev/orgs","repos_url":"https://api.github.com/users/millerdev/repos","events_url":"https://api.github.com/users/millerdev/events{/privacy}","received_events_url":"https://api.github.com/users/millerdev/received_events","type":"User","site_admin":false},"body":"This should make it possible to remove the ansible key pair from all machines and switch to using dev keys for authentication.\r\n\r\nWhen logging into the ansible control machine, it will be important to use `ssh -A` or add `ForwardAgent yes` to your ssh config. Not sure if `mosh` has support for agent forwarding yet.\r\n\r\nInline comments to follow. Feedback welcome.\r\n\r\n@dannyroberts cc @proteusvacuum ","created_at":"2016-07-22T18:15:32Z","updated_at":"2016-07-26T14:14:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2238d3fe2845ca42d65e5ad16426a0ebc6eca1e7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/467/comments","statuses_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/statuses/80aa7a0f987f8e4f6e0b17a19a50a77fdc9a6c27","head":{"label":"dimagi:dm/secure-deploy","ref":"dm/secure-deploy","sha":"80aa7a0f987f8e4f6e0b17a19a50a77fdc9a6c27","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":22074543,"name":"commcarehq-ansible","full_name":"dimagi/commcarehq-ansible","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcarehq-ansible","description":"","fork":false,"url":"https://api.github.com/repos/dimagi/commcarehq-ansible","forks_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/forks","keys_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/teams","hooks_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/events","assignees_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/tags","blobs_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/subscription","commits_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/merges","archive_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/downloads","issues_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/deployments","created_at":"2014-07-21T18:04:26Z","updated_at":"2016-01-19T13:00:50Z","pushed_at":"2016-07-26T10:26:30Z","git_url":"git://github.com/dimagi/commcarehq-ansible.git","ssh_url":"git@github.com:dimagi/commcarehq-ansible.git","clone_url":"https://github.com/dimagi/commcarehq-ansible.git","svn_url":"https://github.com/dimagi/commcarehq-ansible","homepage":null,"size":1461,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":2,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"205fa7c00d2ab1bdac9f3843554e7195b581f7cb","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":22074543,"name":"commcarehq-ansible","full_name":"dimagi/commcarehq-ansible","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcarehq-ansible","description":"","fork":false,"url":"https://api.github.com/repos/dimagi/commcarehq-ansible","forks_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/forks","keys_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/teams","hooks_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/events","assignees_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/tags","blobs_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/subscription","commits_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/merges","archive_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/downloads","issues_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcarehq-ansible/deployments","created_at":"2014-07-21T18:04:26Z","updated_at":"2016-01-19T13:00:50Z","pushed_at":"2016-07-26T10:26:30Z","git_url":"git://github.com/dimagi/commcarehq-ansible.git","ssh_url":"git@github.com:dimagi/commcarehq-ansible.git","clone_url":"https://github.com/dimagi/commcarehq-ansible.git","svn_url":"https://github.com/dimagi/commcarehq-ansible","homepage":null,"size":1461,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467"},"html":{"href":"https://github.com/dimagi/commcarehq-ansible/pull/467"},"issue":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/467"},"comments":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/issues/467/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/pulls/467/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcarehq-ansible/statuses/80aa7a0f987f8e4f6e0b17a19a50a77fdc9a6c27"}}}}
{"actor":{"display_login":"snopoke"}}