{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/packer/pulls/comments/226460483","pull_request_review_id":166283901,"id":226460483,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjQ2MDQ4Mw==","diff_hunk":"@@ -108,6 +108,14 @@ Optional parameters:\n     **Important:** If you customize this, be sure to include something like the\n     `-e` flag, otherwise individual steps failing won't fail the provisioner.\n \n+-  `onlyon` (array of strings) - This is an array of \n+    [runtime operating systems](https://golang.org/doc/install/source#environment)\n+    where `shell-local` will only run on. This allows you to run `shell-local` *only* \n+    on specific compatible operating systems. If specified, shell-local will only\n+    execute if runtime operating system is in the list; otherwise it will skip the \n+    `shell-local` command. The default behavior is for `shell-local` to run if ","path":"website/source/docs/provisioners/shell-local.html.md","position":9,"original_position":9,"commit_id":"25c0b98363a8bbad9b14b1374af36bcf36477d6d","original_commit_id":"25c0b98363a8bbad9b14b1374af36bcf36477d6d","user":{"login":"SwampDragons","id":1008838,"node_id":"MDQ6VXNlcjEwMDg4Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1008838?v=4","gravatar_id":"","url":"https://api.github.com/users/SwampDragons","html_url":"https://github.com/SwampDragons","followers_url":"https://api.github.com/users/SwampDragons/followers","following_url":"https://api.github.com/users/SwampDragons/following{/other_user}","gists_url":"https://api.github.com/users/SwampDragons/gists{/gist_id}","starred_url":"https://api.github.com/users/SwampDragons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwampDragons/subscriptions","organizations_url":"https://api.github.com/users/SwampDragons/orgs","repos_url":"https://api.github.com/users/SwampDragons/repos","events_url":"https://api.github.com/users/SwampDragons/events{/privacy}","received_events_url":"https://api.github.com/users/SwampDragons/received_events","type":"User","site_admin":false},"body":"How about \"By default, `shell-local` will always run if `only_on` is not set.\"","created_at":"2018-10-18T20:49:28Z","updated_at":"2018-10-18T20:50:50Z","html_url":"https://github.com/hashicorp/packer/pull/6878#discussion_r226460483","pull_request_url":"https://api.github.com/repos/hashicorp/packer/pulls/6878","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/packer/pulls/comments/226460483"},"html":{"href":"https://github.com/hashicorp/packer/pull/6878#discussion_r226460483"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/packer/pulls/6878"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/packer/pulls/6878","id":224084364,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MDg0MzY0","html_url":"https://github.com/hashicorp/packer/pull/6878","diff_url":"https://github.com/hashicorp/packer/pull/6878.diff","patch_url":"https://github.com/hashicorp/packer/pull/6878.patch","issue_url":"https://api.github.com/repos/hashicorp/packer/issues/6878","number":6878,"state":"open","locked":false,"title":"feat: ability to specify runtime OSs where shell-local should run","user":{"login":"jvasallo","id":1730603,"node_id":"MDQ6VXNlcjE3MzA2MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1730603?v=4","gravatar_id":"","url":"https://api.github.com/users/jvasallo","html_url":"https://github.com/jvasallo","followers_url":"https://api.github.com/users/jvasallo/followers","following_url":"https://api.github.com/users/jvasallo/following{/other_user}","gists_url":"https://api.github.com/users/jvasallo/gists{/gist_id}","starred_url":"https://api.github.com/users/jvasallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvasallo/subscriptions","organizations_url":"https://api.github.com/users/jvasallo/orgs","repos_url":"https://api.github.com/users/jvasallo/repos","events_url":"https://api.github.com/users/jvasallo/events{/privacy}","received_events_url":"https://api.github.com/users/jvasallo/received_events","type":"User","site_admin":false},"body":"Enabling the ability to pass in a list of runtime operating systems where shell-local should run. If list is not provided, execute default behavior. If specified, but runtime not in list, skip over execution.\r\n\r\nI was not sure to either fail earlier and raise an exception, or gracefully skip. I voted for skipping as it can potentially eliminate duplication allowing folks to do things like:\r\n```\r\n\"provisioners\": [\r\n    {\r\n      \"type\": \"shell-local\",\r\n      \"inline\": \"setup.sh\",\r\n      \"onlyon\": [\"darwin\", \"linux\"]\r\n    },\r\n    {\r\n      \"type\": \"shell-local\",\r\n      \"inline\": \"setup.bat\",\r\n      \"onlyon\": [\"windows\"]\r\n    }\r\n```\r\n\r\nApologies as I am still new to GoLang, I think there is still tons of fixes and simplifications that can be done here and open for suggestions! 👍Also, I think this can be extended if needed to other provisioners; however starting small :). \r\n\r\nPotentially closes #6678 ","created_at":"2018-10-18T20:13:27Z","updated_at":"2018-10-18T20:50:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4cb6bf61b81fe1e8fb9071c6cba1805e55c53a53","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/packer/pulls/6878/commits","review_comments_url":"https://api.github.com/repos/hashicorp/packer/pulls/6878/comments","review_comment_url":"https://api.github.com/repos/hashicorp/packer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/packer/issues/6878/comments","statuses_url":"https://api.github.com/repos/hashicorp/packer/statuses/25c0b98363a8bbad9b14b1374af36bcf36477d6d","head":{"label":"jvasallo:f-shell-local-specificos","ref":"f-shell-local-specificos","sha":"25c0b98363a8bbad9b14b1374af36bcf36477d6d","user":{"login":"jvasallo","id":1730603,"node_id":"MDQ6VXNlcjE3MzA2MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1730603?v=4","gravatar_id":"","url":"https://api.github.com/users/jvasallo","html_url":"https://github.com/jvasallo","followers_url":"https://api.github.com/users/jvasallo/followers","following_url":"https://api.github.com/users/jvasallo/following{/other_user}","gists_url":"https://api.github.com/users/jvasallo/gists{/gist_id}","starred_url":"https://api.github.com/users/jvasallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvasallo/subscriptions","organizations_url":"https://api.github.com/users/jvasallo/orgs","repos_url":"https://api.github.com/users/jvasallo/repos","events_url":"https://api.github.com/users/jvasallo/events{/privacy}","received_events_url":"https://api.github.com/users/jvasallo/received_events","type":"User","site_admin":false},"repo":{"id":153644245,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM2NDQyNDU=","name":"packer","full_name":"jvasallo/packer","private":false,"owner":{"login":"jvasallo","id":1730603,"node_id":"MDQ6VXNlcjE3MzA2MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1730603?v=4","gravatar_id":"","url":"https://api.github.com/users/jvasallo","html_url":"https://github.com/jvasallo","followers_url":"https://api.github.com/users/jvasallo/followers","following_url":"https://api.github.com/users/jvasallo/following{/other_user}","gists_url":"https://api.github.com/users/jvasallo/gists{/gist_id}","starred_url":"https://api.github.com/users/jvasallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvasallo/subscriptions","organizations_url":"https://api.github.com/users/jvasallo/orgs","repos_url":"https://api.github.com/users/jvasallo/repos","events_url":"https://api.github.com/users/jvasallo/events{/privacy}","received_events_url":"https://api.github.com/users/jvasallo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jvasallo/packer","description":"Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.","fork":true,"url":"https://api.github.com/repos/jvasallo/packer","forks_url":"https://api.github.com/repos/jvasallo/packer/forks","keys_url":"https://api.github.com/repos/jvasallo/packer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jvasallo/packer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jvasallo/packer/teams","hooks_url":"https://api.github.com/repos/jvasallo/packer/hooks","issue_events_url":"https://api.github.com/repos/jvasallo/packer/issues/events{/number}","events_url":"https://api.github.com/repos/jvasallo/packer/events","assignees_url":"https://api.github.com/repos/jvasallo/packer/assignees{/user}","branches_url":"https://api.github.com/repos/jvasallo/packer/branches{/branch}","tags_url":"https://api.github.com/repos/jvasallo/packer/tags","blobs_url":"https://api.github.com/repos/jvasallo/packer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jvasallo/packer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jvasallo/packer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jvasallo/packer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jvasallo/packer/statuses/{sha}","languages_url":"https://api.github.com/repos/jvasallo/packer/languages","stargazers_url":"https://api.github.com/repos/jvasallo/packer/stargazers","contributors_url":"https://api.github.com/repos/jvasallo/packer/contributors","subscribers_url":"https://api.github.com/repos/jvasallo/packer/subscribers","subscription_url":"https://api.github.com/repos/jvasallo/packer/subscription","commits_url":"https://api.github.com/repos/jvasallo/packer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jvasallo/packer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jvasallo/packer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jvasallo/packer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jvasallo/packer/contents/{+path}","compare_url":"https://api.github.com/repos/jvasallo/packer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jvasallo/packer/merges","archive_url":"https://api.github.com/repos/jvasallo/packer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jvasallo/packer/downloads","issues_url":"https://api.github.com/repos/jvasallo/packer/issues{/number}","pulls_url":"https://api.github.com/repos/jvasallo/packer/pulls{/number}","milestones_url":"https://api.github.com/repos/jvasallo/packer/milestones{/number}","notifications_url":"https://api.github.com/repos/jvasallo/packer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jvasallo/packer/labels{/name}","releases_url":"https://api.github.com/repos/jvasallo/packer/releases{/id}","deployments_url":"https://api.github.com/repos/jvasallo/packer/deployments","created_at":"2018-10-18T15:11:41Z","updated_at":"2018-10-18T15:11:47Z","pushed_at":"2018-10-18T20:10:56Z","git_url":"git://github.com/jvasallo/packer.git","ssh_url":"git@github.com:jvasallo/packer.git","clone_url":"https://github.com/jvasallo/packer.git","svn_url":"https://github.com/jvasallo/packer","homepage":"http://www.packer.io","size":39905,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"c5b6eff69153db29cc614c41284aa1c65e22b5bc","user":{"login":"hashicorp","id":761456,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MTQ1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","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":8966356,"node_id":"MDEwOlJlcG9zaXRvcnk4OTY2MzU2","name":"packer","full_name":"hashicorp/packer","private":false,"owner":{"login":"hashicorp","id":761456,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MTQ1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","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},"html_url":"https://github.com/hashicorp/packer","description":"Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.","fork":false,"url":"https://api.github.com/repos/hashicorp/packer","forks_url":"https://api.github.com/repos/hashicorp/packer/forks","keys_url":"https://api.github.com/repos/hashicorp/packer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/packer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/packer/teams","hooks_url":"https://api.github.com/repos/hashicorp/packer/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/packer/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/packer/events","assignees_url":"https://api.github.com/repos/hashicorp/packer/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/packer/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/packer/tags","blobs_url":"https://api.github.com/repos/hashicorp/packer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/packer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/packer/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/packer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/packer/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/packer/languages","stargazers_url":"https://api.github.com/repos/hashicorp/packer/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/packer/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/packer/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/packer/subscription","commits_url":"https://api.github.com/repos/hashicorp/packer/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/packer/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/packer/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/packer/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/packer/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/packer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/packer/merges","archive_url":"https://api.github.com/repos/hashicorp/packer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/packer/downloads","issues_url":"https://api.github.com/repos/hashicorp/packer/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/packer/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/packer/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/packer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/packer/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/packer/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/packer/deployments","created_at":"2013-03-23T05:43:03Z","updated_at":"2018-10-18T18:13:27Z","pushed_at":"2018-10-18T20:13:28Z","git_url":"git://github.com/hashicorp/packer.git","ssh_url":"git@github.com:hashicorp/packer.git","clone_url":"https://github.com/hashicorp/packer.git","svn_url":"https://github.com/hashicorp/packer","homepage":"http://www.packer.io","size":39978,"stargazers_count":8093,"watchers_count":8093,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2229,"mirror_url":null,"archived":false,"open_issues_count":391,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":2229,"open_issues":391,"watchers":8093,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/packer/pulls/6878"},"html":{"href":"https://github.com/hashicorp/packer/pull/6878"},"issue":{"href":"https://api.github.com/repos/hashicorp/packer/issues/6878"},"comments":{"href":"https://api.github.com/repos/hashicorp/packer/issues/6878/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/packer/pulls/6878/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/packer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/packer/pulls/6878/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/packer/statuses/25c0b98363a8bbad9b14b1374af36bcf36477d6d"}},"author_association":"NONE"}}
{"actor":{"display_login":"SwampDragons"}}