{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/community-templates/pulls/comments/54881957","id":54881957,"diff_hunk":"@@ -20,6 +20,13 @@ oses:\n hostname: <%= @host.shortname %>\n fqdn: <%= @host %>\n manage_etc_hosts: true\n+ssh_pwauth: <%= @host.params['ssh_pwauth'] || true %>\n+<% if @host.params['ssh_authorized_keys'] -%>","path":"cloudinit/userdata_cloudinit.erb","position":5,"original_position":5,"commit_id":"8cbf4aaed44c873a60f53498562a3ace22722f99","original_commit_id":"8cbf4aaed44c873a60f53498562a3ace22722f99","user":{"login":"ekohl","id":155810,"avatar_url":"https://avatars.githubusercontent.com/u/155810?v=3","gravatar_id":"","url":"https://api.github.com/users/ekohl","html_url":"https://github.com/ekohl","followers_url":"https://api.github.com/users/ekohl/followers","following_url":"https://api.github.com/users/ekohl/following{/other_user}","gists_url":"https://api.github.com/users/ekohl/gists{/gist_id}","starred_url":"https://api.github.com/users/ekohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekohl/subscriptions","organizations_url":"https://api.github.com/users/ekohl/orgs","repos_url":"https://api.github.com/users/ekohl/repos","events_url":"https://api.github.com/users/ekohl/events{/privacy}","received_events_url":"https://api.github.com/users/ekohl/received_events","type":"User","site_admin":false},"body":"I keep forgetting this, but if this is an empty string, will it still end up with a valid config or do you need to check if it's non-empty as well?","created_at":"2016-03-03T13:56:46Z","updated_at":"2016-03-03T13:56:46Z","html_url":"https://github.com/theforeman/community-templates/pull/241#discussion_r54881957","pull_request_url":"https://api.github.com/repos/theforeman/community-templates/pulls/241","_links":{"self":{"href":"https://api.github.com/repos/theforeman/community-templates/pulls/comments/54881957"},"html":{"href":"https://github.com/theforeman/community-templates/pull/241#discussion_r54881957"},"pull_request":{"href":"https://api.github.com/repos/theforeman/community-templates/pulls/241"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/community-templates/pulls/241","id":59784679,"html_url":"https://github.com/theforeman/community-templates/pull/241","diff_url":"https://github.com/theforeman/community-templates/pull/241.diff","patch_url":"https://github.com/theforeman/community-templates/pull/241.patch","issue_url":"https://api.github.com/repos/theforeman/community-templates/issues/241","number":241,"state":"open","locked":false,"title":"Add SSH authorized_keys to cloud-init script","user":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"body":"Some systems like Fedora/CentOS/RHEL Atomic won't allow you to set passwords to their root user. In this case ssh keys have to be used. This reads a parameter ssh_authorized_keys (that coreOS uses already) and puts these keys in the authorized_files for root via cloudinit.\r\n\r\ncc @stbenjam @inecas @ares - how about changing the remote execution SSH keys parameter to this?  It's already being used in the cloudconfig and provision scripts for CoreOS, and it's easier to understand than 'remote_execution_ssh_keys'. The idea is that users will create a global or host group parameter 'ssh_authorized_keys' and put there their keys - currently they have to create 2, one for CoreOS, another for remote execution.","created_at":"2016-02-18T11:22:26Z","updated_at":"2016-03-03T13:56:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d478a743a8d933fc5e2acf4559bb4b1ca353b7c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/community-templates/pulls/241/commits","review_comments_url":"https://api.github.com/repos/theforeman/community-templates/pulls/241/comments","review_comment_url":"https://api.github.com/repos/theforeman/community-templates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/community-templates/issues/241/comments","statuses_url":"https://api.github.com/repos/theforeman/community-templates/statuses/8cbf4aaed44c873a60f53498562a3ace22722f99","head":{"label":"dLobatog:atomic_userdata","ref":"atomic_userdata","sha":"8cbf4aaed44c873a60f53498562a3ace22722f99","user":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"repo":{"id":28625844,"name":"community-templates","full_name":"dLobatog/community-templates","owner":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dLobatog/community-templates","description":"A place to share templates for various OSes for Foreman's provisioning","fork":true,"url":"https://api.github.com/repos/dLobatog/community-templates","forks_url":"https://api.github.com/repos/dLobatog/community-templates/forks","keys_url":"https://api.github.com/repos/dLobatog/community-templates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dLobatog/community-templates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dLobatog/community-templates/teams","hooks_url":"https://api.github.com/repos/dLobatog/community-templates/hooks","issue_events_url":"https://api.github.com/repos/dLobatog/community-templates/issues/events{/number}","events_url":"https://api.github.com/repos/dLobatog/community-templates/events","assignees_url":"https://api.github.com/repos/dLobatog/community-templates/assignees{/user}","branches_url":"https://api.github.com/repos/dLobatog/community-templates/branches{/branch}","tags_url":"https://api.github.com/repos/dLobatog/community-templates/tags","blobs_url":"https://api.github.com/repos/dLobatog/community-templates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dLobatog/community-templates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dLobatog/community-templates/git/refs{/sha}","trees_url":"https://api.github.com/repos/dLobatog/community-templates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dLobatog/community-templates/statuses/{sha}","languages_url":"https://api.github.com/repos/dLobatog/community-templates/languages","stargazers_url":"https://api.github.com/repos/dLobatog/community-templates/stargazers","contributors_url":"https://api.github.com/repos/dLobatog/community-templates/contributors","subscribers_url":"https://api.github.com/repos/dLobatog/community-templates/subscribers","subscription_url":"https://api.github.com/repos/dLobatog/community-templates/subscription","commits_url":"https://api.github.com/repos/dLobatog/community-templates/commits{/sha}","git_commits_url":"https://api.github.com/repos/dLobatog/community-templates/git/commits{/sha}","comments_url":"https://api.github.com/repos/dLobatog/community-templates/comments{/number}","issue_comment_url":"https://api.github.com/repos/dLobatog/community-templates/issues/comments{/number}","contents_url":"https://api.github.com/repos/dLobatog/community-templates/contents/{+path}","compare_url":"https://api.github.com/repos/dLobatog/community-templates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dLobatog/community-templates/merges","archive_url":"https://api.github.com/repos/dLobatog/community-templates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dLobatog/community-templates/downloads","issues_url":"https://api.github.com/repos/dLobatog/community-templates/issues{/number}","pulls_url":"https://api.github.com/repos/dLobatog/community-templates/pulls{/number}","milestones_url":"https://api.github.com/repos/dLobatog/community-templates/milestones{/number}","notifications_url":"https://api.github.com/repos/dLobatog/community-templates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dLobatog/community-templates/labels{/name}","releases_url":"https://api.github.com/repos/dLobatog/community-templates/releases{/id}","deployments_url":"https://api.github.com/repos/dLobatog/community-templates/deployments","created_at":"2014-12-30T09:54:46Z","updated_at":"2014-12-30T09:54:47Z","pushed_at":"2016-03-02T13:22:34Z","git_url":"git://github.com/dLobatog/community-templates.git","ssh_url":"git@github.com:dLobatog/community-templates.git","clone_url":"https://github.com/dLobatog/community-templates.git","svn_url":"https://github.com/dLobatog/community-templates","homepage":null,"size":273,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"6b5d7f372f8f021e9e8e0fcd880b362a89a1d96d","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":8202192,"name":"community-templates","full_name":"theforeman/community-templates","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/community-templates","description":"A place to share templates for various OSes for Foreman's provisioning","fork":false,"url":"https://api.github.com/repos/theforeman/community-templates","forks_url":"https://api.github.com/repos/theforeman/community-templates/forks","keys_url":"https://api.github.com/repos/theforeman/community-templates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/community-templates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/community-templates/teams","hooks_url":"https://api.github.com/repos/theforeman/community-templates/hooks","issue_events_url":"https://api.github.com/repos/theforeman/community-templates/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/community-templates/events","assignees_url":"https://api.github.com/repos/theforeman/community-templates/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/community-templates/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/community-templates/tags","blobs_url":"https://api.github.com/repos/theforeman/community-templates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/community-templates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/community-templates/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/community-templates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/community-templates/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/community-templates/languages","stargazers_url":"https://api.github.com/repos/theforeman/community-templates/stargazers","contributors_url":"https://api.github.com/repos/theforeman/community-templates/contributors","subscribers_url":"https://api.github.com/repos/theforeman/community-templates/subscribers","subscription_url":"https://api.github.com/repos/theforeman/community-templates/subscription","commits_url":"https://api.github.com/repos/theforeman/community-templates/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/community-templates/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/community-templates/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/community-templates/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/community-templates/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/community-templates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/community-templates/merges","archive_url":"https://api.github.com/repos/theforeman/community-templates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/community-templates/downloads","issues_url":"https://api.github.com/repos/theforeman/community-templates/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/community-templates/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/community-templates/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/community-templates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/community-templates/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/community-templates/releases{/id}","deployments_url":"https://api.github.com/repos/theforeman/community-templates/deployments","created_at":"2013-02-14T15:43:30Z","updated_at":"2016-02-23T10:16:25Z","pushed_at":"2016-03-03T10:08:15Z","git_url":"git://github.com/theforeman/community-templates.git","ssh_url":"git@github.com:theforeman/community-templates.git","clone_url":"https://github.com/theforeman/community-templates.git","svn_url":"https://github.com/theforeman/community-templates","homepage":null,"size":513,"stargazers_count":60,"watchers_count":60,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":12,"forks":81,"open_issues":12,"watchers":60,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/community-templates/pulls/241"},"html":{"href":"https://github.com/theforeman/community-templates/pull/241"},"issue":{"href":"https://api.github.com/repos/theforeman/community-templates/issues/241"},"comments":{"href":"https://api.github.com/repos/theforeman/community-templates/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/community-templates/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/community-templates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/community-templates/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/community-templates/statuses/8cbf4aaed44c873a60f53498562a3ace22722f99"}}}}