{"action":"created","issue":{"url":"https://api.github.com/repos/snowdrop/openshift-infra/issues/28","repository_url":"https://api.github.com/repos/snowdrop/openshift-infra","labels_url":"https://api.github.com/repos/snowdrop/openshift-infra/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/snowdrop/openshift-infra/issues/28/comments","events_url":"https://api.github.com/repos/snowdrop/openshift-infra/issues/28/events","html_url":"https://github.com/snowdrop/openshift-infra/issues/28","id":309651610,"number":28,"title":"Improve playbook to import/authorize ssh_key","user":{"login":"cmoulliard","id":463790,"avatar_url":"https://avatars2.githubusercontent.com/u/463790?v=4","gravatar_id":"","url":"https://api.github.com/users/cmoulliard","html_url":"https://github.com/cmoulliard","followers_url":"https://api.github.com/users/cmoulliard/followers","following_url":"https://api.github.com/users/cmoulliard/following{/other_user}","gists_url":"https://api.github.com/users/cmoulliard/gists{/gist_id}","starred_url":"https://api.github.com/users/cmoulliard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmoulliard/subscriptions","organizations_url":"https://api.github.com/users/cmoulliard/orgs","repos_url":"https://api.github.com/users/cmoulliard/repos","events_url":"https://api.github.com/users/cmoulliard/events{/privacy}","received_events_url":"https://api.github.com/users/cmoulliard/received_events","type":"User","site_admin":false},"labels":[{"id":866744318,"url":"https://api.github.com/repos/snowdrop/openshift-infra/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":{"login":"geoand","id":4374975,"avatar_url":"https://avatars2.githubusercontent.com/u/4374975?v=4","gravatar_id":"","url":"https://api.github.com/users/geoand","html_url":"https://github.com/geoand","followers_url":"https://api.github.com/users/geoand/followers","following_url":"https://api.github.com/users/geoand/following{/other_user}","gists_url":"https://api.github.com/users/geoand/gists{/gist_id}","starred_url":"https://api.github.com/users/geoand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoand/subscriptions","organizations_url":"https://api.github.com/users/geoand/orgs","repos_url":"https://api.github.com/users/geoand/repos","events_url":"https://api.github.com/users/geoand/events{/privacy}","received_events_url":"https://api.github.com/users/geoand/received_events","type":"User","site_admin":false},"assignees":[{"login":"geoand","id":4374975,"avatar_url":"https://avatars2.githubusercontent.com/u/4374975?v=4","gravatar_id":"","url":"https://api.github.com/users/geoand","html_url":"https://github.com/geoand","followers_url":"https://api.github.com/users/geoand/followers","following_url":"https://api.github.com/users/geoand/following{/other_user}","gists_url":"https://api.github.com/users/geoand/gists{/gist_id}","starred_url":"https://api.github.com/users/geoand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoand/subscriptions","organizations_url":"https://api.github.com/users/geoand/orgs","repos_url":"https://api.github.com/users/geoand/repos","events_url":"https://api.github.com/users/geoand/events{/privacy}","received_events_url":"https://api.github.com/users/geoand/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/snowdrop/openshift-infra/milestones/2","html_url":"https://github.com/snowdrop/openshift-infra/milestone/2","labels_url":"https://api.github.com/repos/snowdrop/openshift-infra/milestones/2/labels","id":3225686,"number":2,"title":"3.9.SP5","description":"","creator":{"login":"cmoulliard","id":463790,"avatar_url":"https://avatars2.githubusercontent.com/u/463790?v=4","gravatar_id":"","url":"https://api.github.com/users/cmoulliard","html_url":"https://github.com/cmoulliard","followers_url":"https://api.github.com/users/cmoulliard/followers","following_url":"https://api.github.com/users/cmoulliard/following{/other_user}","gists_url":"https://api.github.com/users/cmoulliard/gists{/gist_id}","starred_url":"https://api.github.com/users/cmoulliard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmoulliard/subscriptions","organizations_url":"https://api.github.com/users/cmoulliard/orgs","repos_url":"https://api.github.com/users/cmoulliard/repos","events_url":"https://api.github.com/users/cmoulliard/events{/privacy}","received_events_url":"https://api.github.com/users/cmoulliard/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2018-03-28T15:51:09Z","updated_at":"2018-05-25T16:10:09Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-03-29T07:44:45Z","updated_at":"2018-05-28T16:09:33Z","closed_at":null,"author_association":"MEMBER","body":"To ssh as root to the vm `hetzner, local`, we use these commands to import our ssh_key as authorized key\r\n\r\n```\r\nsshpass -f pwd.txt ssh -o StrictHostKeyChecking=no root@127.0.0.1 -p 5222 \"mkdir ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys\"\r\nsshpass -f pwd.txt ssh-copy-id -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa.pub root@127.0.0.1 -p 5222\r\n```\r\n\r\nWe should improve the existing playbook to : \r\n\r\n- Create a generic private/public key and host it on a github repo\r\n- Import the public ssh_key as authorized user within the target vm\r\n\r\nInteresting articles : \r\n\r\n- http://blog.appliedinformaticsinc.com/how-to-manage-ssh-keys-using-ansible/\r\n- [Authorize key](http://docs.ansible.com/ansible/latest/modules/authorized_key_module.html)\r\n- [Generate ssh key and create user](http://docs.ansible.com/ansible/latest/modules/user_module.html)"},"comment":{"url":"https://api.github.com/repos/snowdrop/openshift-infra/issues/comments/392563002","html_url":"https://github.com/snowdrop/openshift-infra/issues/28#issuecomment-392563002","issue_url":"https://api.github.com/repos/snowdrop/openshift-infra/issues/28","id":392563002,"user":{"login":"geoand","id":4374975,"avatar_url":"https://avatars2.githubusercontent.com/u/4374975?v=4","gravatar_id":"","url":"https://api.github.com/users/geoand","html_url":"https://github.com/geoand","followers_url":"https://api.github.com/users/geoand/followers","following_url":"https://api.github.com/users/geoand/following{/other_user}","gists_url":"https://api.github.com/users/geoand/gists{/gist_id}","starred_url":"https://api.github.com/users/geoand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoand/subscriptions","organizations_url":"https://api.github.com/users/geoand/orgs","repos_url":"https://api.github.com/users/geoand/repos","events_url":"https://api.github.com/users/geoand/events{/privacy}","received_events_url":"https://api.github.com/users/geoand/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T16:09:33Z","updated_at":"2018-05-28T16:09:33Z","author_association":"MEMBER","body":"@cmoulliard I propose we close this since we now have support for importing keys for GitHub."}}
{"actor":{"display_login":"geoand"}}