{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/29974037","id":29974037,"diff_hunk":"@@ -0,0 +1,72 @@\n+package chefclient\n+\n+import (\n+\t\"bytes\"\n+\t\"strings\"\n+\n+\t\"github.com/hashicorp/terraform/communicator\"\n+\t\"github.com/hashicorp/terraform/terraform\"\n+)\n+\n+func (p *Provisioner) sshInstallChefClient(\n+\to terraform.UIOutput,\n+\tcomm communicator.Communicator) error {\n+\tvar installCmd bytes.Buffer\n+\n+\t// Build up a single command based on the given config options\n+\tinstallCmd.WriteString(\"curl\")\n+\tif p.HTTPProxy != \"\" {\n+\t\tinstallCmd.WriteString(\" --proxy \" + p.HTTPProxy)\n+\t}\n+\tif p.NOProxy != nil {\n+\t\tinstallCmd.WriteString(\" --noproxy \" + strings.Join(p.NOProxy, \",\"))\n+\t}\n+\tinstallCmd.WriteString(\" -LO https://www.chef.io/chef/install.sh 2>/dev/null &&\")\n+\tif !p.PreventSudo {\n+\t\tinstallCmd.WriteString(\" sudo\")\n+\t}\n+\tinstallCmd.WriteString(\" bash ./install.sh\")\n+\tif p.Version != \"\" {\n+\t\tinstallCmd.WriteString(\" -v \" + p.Version)\n+\t}\n+\tinstallCmd.WriteString(\" &&\")\n+\tif !p.PreventSudo {\n+\t\tinstallCmd.WriteString(\" sudo\")\n+\t}\n+\tinstallCmd.WriteString(\" rm -f install.sh\")\n+\n+\t// Execute the command to install Chef Client\n+\treturn p.runCommand(o, comm, installCmd.String())","path":"builtin/provisioners/chef-client/ssh_provisioner.go","position":39,"original_position":39,"commit_id":"d4150d5b1a7869b5b511dd4becf3b470e98d3fd7","original_commit_id":"d4150d5b1a7869b5b511dd4becf3b470e98d3fd7","user":{"login":"svanharmelen","id":4171547,"avatar_url":"https://avatars.githubusercontent.com/u/4171547?v=3","gravatar_id":"","url":"https://api.github.com/users/svanharmelen","html_url":"https://github.com/svanharmelen","followers_url":"https://api.github.com/users/svanharmelen/followers","following_url":"https://api.github.com/users/svanharmelen/following{/other_user}","gists_url":"https://api.github.com/users/svanharmelen/gists{/gist_id}","starred_url":"https://api.github.com/users/svanharmelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanharmelen/subscriptions","organizations_url":"https://api.github.com/users/svanharmelen/orgs","repos_url":"https://api.github.com/users/svanharmelen/repos","events_url":"https://api.github.com/users/svanharmelen/events{/privacy}","received_events_url":"https://api.github.com/users/svanharmelen/received_events","type":"User","site_admin":false},"body":"@sethvargo by logging I fully assume you mean a debug log line right? So something like `log.Printf(\"[DEBUG] ... \")`\r\n\r\nOf do you mean a log line to the normal output using the passed in terraform.UIOutput?","created_at":"2015-05-08T20:32:10Z","updated_at":"2015-05-08T20:32:10Z","html_url":"https://github.com/hashicorp/terraform/pull/1868#discussion_r29974037","pull_request_url":"https://api.github.com/repos/hashicorp/terraform/pulls/1868","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/29974037"},"html":{"href":"https://github.com/hashicorp/terraform/pull/1868#discussion_r29974037"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/1868"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/1868","id":35024100,"html_url":"https://github.com/hashicorp/terraform/pull/1868","diff_url":"https://github.com/hashicorp/terraform/pull/1868.diff","patch_url":"https://github.com/hashicorp/terraform/pull/1868.patch","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/1868","number":1868,"state":"open","locked":false,"title":"New provisioner for Chef-Client","user":{"login":"svanharmelen","id":4171547,"avatar_url":"https://avatars.githubusercontent.com/u/4171547?v=3","gravatar_id":"","url":"https://api.github.com/users/svanharmelen","html_url":"https://github.com/svanharmelen","followers_url":"https://api.github.com/users/svanharmelen/followers","following_url":"https://api.github.com/users/svanharmelen/following{/other_user}","gists_url":"https://api.github.com/users/svanharmelen/gists{/gist_id}","starred_url":"https://api.github.com/users/svanharmelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanharmelen/subscriptions","organizations_url":"https://api.github.com/users/svanharmelen/orgs","repos_url":"https://api.github.com/users/svanharmelen/repos","events_url":"https://api.github.com/users/svanharmelen/events{/privacy}","received_events_url":"https://api.github.com/users/svanharmelen/received_events","type":"User","site_admin":false},"body":"The PR is pretty complete and has a tested provisioner that works for both SSH and WinRM. There is a pretty decent test coverage and docs are included in this PR as well.\r\n\r\nCloses https://github.com/hashicorp/terraform/issues/1158","created_at":"2015-05-08T16:24:40Z","updated_at":"2015-05-08T20:32:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f9433e4608e363706eab0c3fde48bcb5201d4e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/terraform/pulls/1868/commits","review_comments_url":"https://api.github.com/repos/hashicorp/terraform/pulls/1868/comments","review_comment_url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/1868/comments","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/d4150d5b1a7869b5b511dd4becf3b470e98d3fd7","head":{"label":"svanharmelen:f-chef-client-provisioner","ref":"f-chef-client-provisioner","sha":"d4150d5b1a7869b5b511dd4becf3b470e98d3fd7","user":{"login":"svanharmelen","id":4171547,"avatar_url":"https://avatars.githubusercontent.com/u/4171547?v=3","gravatar_id":"","url":"https://api.github.com/users/svanharmelen","html_url":"https://github.com/svanharmelen","followers_url":"https://api.github.com/users/svanharmelen/followers","following_url":"https://api.github.com/users/svanharmelen/following{/other_user}","gists_url":"https://api.github.com/users/svanharmelen/gists{/gist_id}","starred_url":"https://api.github.com/users/svanharmelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanharmelen/subscriptions","organizations_url":"https://api.github.com/users/svanharmelen/orgs","repos_url":"https://api.github.com/users/svanharmelen/repos","events_url":"https://api.github.com/users/svanharmelen/events{/privacy}","received_events_url":"https://api.github.com/users/svanharmelen/received_events","type":"User","site_admin":false},"repo":{"id":27924829,"name":"terraform","full_name":"svanharmelen/terraform","owner":{"login":"svanharmelen","id":4171547,"avatar_url":"https://avatars.githubusercontent.com/u/4171547?v=3","gravatar_id":"","url":"https://api.github.com/users/svanharmelen","html_url":"https://github.com/svanharmelen","followers_url":"https://api.github.com/users/svanharmelen/followers","following_url":"https://api.github.com/users/svanharmelen/following{/other_user}","gists_url":"https://api.github.com/users/svanharmelen/gists{/gist_id}","starred_url":"https://api.github.com/users/svanharmelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanharmelen/subscriptions","organizations_url":"https://api.github.com/users/svanharmelen/orgs","repos_url":"https://api.github.com/users/svanharmelen/repos","events_url":"https://api.github.com/users/svanharmelen/events{/privacy}","received_events_url":"https://api.github.com/users/svanharmelen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/svanharmelen/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":true,"url":"https://api.github.com/repos/svanharmelen/terraform","forks_url":"https://api.github.com/repos/svanharmelen/terraform/forks","keys_url":"https://api.github.com/repos/svanharmelen/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svanharmelen/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svanharmelen/terraform/teams","hooks_url":"https://api.github.com/repos/svanharmelen/terraform/hooks","issue_events_url":"https://api.github.com/repos/svanharmelen/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/svanharmelen/terraform/events","assignees_url":"https://api.github.com/repos/svanharmelen/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/svanharmelen/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/svanharmelen/terraform/tags","blobs_url":"https://api.github.com/repos/svanharmelen/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svanharmelen/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svanharmelen/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/svanharmelen/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svanharmelen/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/svanharmelen/terraform/languages","stargazers_url":"https://api.github.com/repos/svanharmelen/terraform/stargazers","contributors_url":"https://api.github.com/repos/svanharmelen/terraform/contributors","subscribers_url":"https://api.github.com/repos/svanharmelen/terraform/subscribers","subscription_url":"https://api.github.com/repos/svanharmelen/terraform/subscription","commits_url":"https://api.github.com/repos/svanharmelen/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/svanharmelen/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/svanharmelen/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/svanharmelen/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/svanharmelen/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/svanharmelen/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svanharmelen/terraform/merges","archive_url":"https://api.github.com/repos/svanharmelen/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svanharmelen/terraform/downloads","issues_url":"https://api.github.com/repos/svanharmelen/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/svanharmelen/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/svanharmelen/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/svanharmelen/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svanharmelen/terraform/labels{/name}","releases_url":"https://api.github.com/repos/svanharmelen/terraform/releases{/id}","created_at":"2014-12-12T15:01:08Z","updated_at":"2015-05-08T12:54:30Z","pushed_at":"2015-05-08T16:18:02Z","git_url":"git://github.com/svanharmelen/terraform.git","ssh_url":"git@github.com:svanharmelen/terraform.git","clone_url":"https://github.com/svanharmelen/terraform.git","svn_url":"https://github.com/svanharmelen/terraform","homepage":"http://www.terraform.io","size":23054,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"8dd1f939e233f67c77c64837a422c784b4732e2c","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":17728164,"name":"terraform","full_name":"hashicorp/terraform","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":false,"url":"https://api.github.com/repos/hashicorp/terraform","forks_url":"https://api.github.com/repos/hashicorp/terraform/forks","keys_url":"https://api.github.com/repos/hashicorp/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/terraform/teams","hooks_url":"https://api.github.com/repos/hashicorp/terraform/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/terraform/events","assignees_url":"https://api.github.com/repos/hashicorp/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/terraform/tags","blobs_url":"https://api.github.com/repos/hashicorp/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/terraform/languages","stargazers_url":"https://api.github.com/repos/hashicorp/terraform/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/terraform/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/terraform/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/terraform/subscription","commits_url":"https://api.github.com/repos/hashicorp/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/terraform/merges","archive_url":"https://api.github.com/repos/hashicorp/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/terraform/downloads","issues_url":"https://api.github.com/repos/hashicorp/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/terraform/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/terraform/releases{/id}","created_at":"2014-03-13T22:25:48Z","updated_at":"2015-05-08T19:57:53Z","pushed_at":"2015-05-08T19:38:51Z","git_url":"git://github.com/hashicorp/terraform.git","ssh_url":"git@github.com:hashicorp/terraform.git","clone_url":"https://github.com/hashicorp/terraform.git","svn_url":"https://github.com/hashicorp/terraform","homepage":"http://www.terraform.io","size":47445,"stargazers_count":2363,"watchers_count":2363,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":416,"mirror_url":null,"open_issues_count":248,"forks":416,"open_issues":248,"watchers":2363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/1868"},"html":{"href":"https://github.com/hashicorp/terraform/pull/1868"},"issue":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/1868"},"comments":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/1868/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/1868/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/1868/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/terraform/statuses/d4150d5b1a7869b5b511dd4becf3b470e98d3fd7"}}}}