{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments/38818313","id":38818313,"diff_hunk":"@@ -0,0 +1,113 @@\n+#\n+# Author:: Ovais Tariq <me@ovaistariq.net>\n+# Cookbook Name:: pacemaker_test\n+# Recipe:: haproxy\n+#\n+# Copyright 2015, Ovais Tariq\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+\n+# Do base setup common to all the machines\n+include_recipe \"haproxy::default\"\n+\n+# HAProxy configuration begins here\n+include_recipe \"haproxy::install_#{node['haproxy']['install_method']}\"\n+\n+cookbook_file \"/etc/default/haproxy\" do\n+  source \"haproxy-default\"\n+  cookbook \"haproxy\"\n+  owner \"root\"\n+  group \"root\"\n+  mode 00644\n+  notifies :restart, \"service[haproxy]\"\n+end\n+\n+\n+if node['haproxy']['enable_admin']\n+  admin = node['haproxy']['admin']\n+  haproxy_lb \"admin\" do\n+    bind \"0.0.0.0:22002\"\n+    mode 'http'\n+    params(admin['options'])\n+  end\n+end\n+\n+conf = node['haproxy']\n+member_max_conn = conf['member_max_connections']\n+member_weight = conf['member_weight']\n+\n+haproxy_lb \"pacemaker_test_lb\" do\n+  type \"listen\"\n+  servers [\"node1 127.0.0.1:8080 check inter 10s rise 2 fall 3\"]\n+  balance \"roundrobin\"\n+  bind \"0.0.0.0:80\"\n+  mode \"http\"\n+end\n+\n+\n+# Re-default user/group to account for role/recipe overrides\n+node.default['haproxy']['stats_socket_user'] = node['haproxy']['user']","path":"chef/cookbooks/pacemaker/test/fixtures/cookbooks/pacemaker_test/recipes/haproxy.rb","position":60,"original_position":60,"commit_id":"a74f3b593c1c3999ca68571c5af369d3dec9e450","original_commit_id":"a74f3b593c1c3999ca68571c5af369d3dec9e450","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-09-06T07:12:16Z","updated_at":"2015-09-06T07:12:16Z","html_url":"https://github.com/crowbar/crowbar-ha/pull/17#discussion_r38818313","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments/38818313"},"html":{"href":"https://github.com/crowbar/crowbar-ha/pull/17#discussion_r38818313"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17","id":44297251,"html_url":"https://github.com/crowbar/crowbar-ha/pull/17","diff_url":"https://github.com/crowbar/crowbar-ha/pull/17.diff","patch_url":"https://github.com/crowbar/crowbar-ha/pull/17.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/17","number":17,"state":"open","locked":false,"title":"Pacemaker cookbook","user":{"login":"ovaistariq","id":1632658,"avatar_url":"https://avatars.githubusercontent.com/u/1632658?v=3","gravatar_id":"","url":"https://api.github.com/users/ovaistariq","html_url":"https://github.com/ovaistariq","followers_url":"https://api.github.com/users/ovaistariq/followers","following_url":"https://api.github.com/users/ovaistariq/following{/other_user}","gists_url":"https://api.github.com/users/ovaistariq/gists{/gist_id}","starred_url":"https://api.github.com/users/ovaistariq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovaistariq/subscriptions","organizations_url":"https://api.github.com/users/ovaistariq/orgs","repos_url":"https://api.github.com/users/ovaistariq/repos","events_url":"https://api.github.com/users/ovaistariq/events{/privacy}","received_events_url":"https://api.github.com/users/ovaistariq/received_events","type":"User","site_admin":false},"body":"Fixes #16 ","created_at":"2015-09-06T07:12:05Z","updated_at":"2015-09-06T07:12:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b9542577b857fbce7537ee141a0282435e69fb9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/17/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/a74f3b593c1c3999ca68571c5af369d3dec9e450","head":{"label":"ovaistariq:pacemaker_cookbook","ref":"pacemaker_cookbook","sha":"a74f3b593c1c3999ca68571c5af369d3dec9e450","user":{"login":"ovaistariq","id":1632658,"avatar_url":"https://avatars.githubusercontent.com/u/1632658?v=3","gravatar_id":"","url":"https://api.github.com/users/ovaistariq","html_url":"https://github.com/ovaistariq","followers_url":"https://api.github.com/users/ovaistariq/followers","following_url":"https://api.github.com/users/ovaistariq/following{/other_user}","gists_url":"https://api.github.com/users/ovaistariq/gists{/gist_id}","starred_url":"https://api.github.com/users/ovaistariq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovaistariq/subscriptions","organizations_url":"https://api.github.com/users/ovaistariq/orgs","repos_url":"https://api.github.com/users/ovaistariq/repos","events_url":"https://api.github.com/users/ovaistariq/events{/privacy}","received_events_url":"https://api.github.com/users/ovaistariq/received_events","type":"User","site_admin":false},"repo":{"id":41771043,"name":"crowbar-ha","full_name":"ovaistariq/crowbar-ha","owner":{"login":"ovaistariq","id":1632658,"avatar_url":"https://avatars.githubusercontent.com/u/1632658?v=3","gravatar_id":"","url":"https://api.github.com/users/ovaistariq","html_url":"https://github.com/ovaistariq","followers_url":"https://api.github.com/users/ovaistariq/followers","following_url":"https://api.github.com/users/ovaistariq/following{/other_user}","gists_url":"https://api.github.com/users/ovaistariq/gists{/gist_id}","starred_url":"https://api.github.com/users/ovaistariq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovaistariq/subscriptions","organizations_url":"https://api.github.com/users/ovaistariq/orgs","repos_url":"https://api.github.com/users/ovaistariq/repos","events_url":"https://api.github.com/users/ovaistariq/events{/privacy}","received_events_url":"https://api.github.com/users/ovaistariq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ovaistariq/crowbar-ha","description":"HA deployment for Crowbar","fork":true,"url":"https://api.github.com/repos/ovaistariq/crowbar-ha","forks_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/forks","keys_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/teams","hooks_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/hooks","issue_events_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/issues/events{/number}","events_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/events","assignees_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/assignees{/user}","branches_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/branches{/branch}","tags_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/tags","blobs_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/git/refs{/sha}","trees_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/statuses/{sha}","languages_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/languages","stargazers_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/stargazers","contributors_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/contributors","subscribers_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/subscribers","subscription_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/subscription","commits_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/commits{/sha}","git_commits_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/git/commits{/sha}","comments_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/comments{/number}","issue_comment_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/issues/comments{/number}","contents_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/contents/{+path}","compare_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/merges","archive_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/downloads","issues_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/issues{/number}","pulls_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/pulls{/number}","milestones_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/milestones{/number}","notifications_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/labels{/name}","releases_url":"https://api.github.com/repos/ovaistariq/crowbar-ha/releases{/id}","created_at":"2015-09-02T00:47:03Z","updated_at":"2015-09-02T00:47:04Z","pushed_at":"2015-09-06T07:07:48Z","git_url":"git://github.com/ovaistariq/crowbar-ha.git","ssh_url":"git@github.com:ovaistariq/crowbar-ha.git","clone_url":"https://github.com/ovaistariq/crowbar-ha.git","svn_url":"https://github.com/ovaistariq/crowbar-ha","homepage":"","size":1332,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"crowbar:master","ref":"master","sha":"ab982ad707e2a046337d477942e4d857344bc3cf","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":39006836,"name":"crowbar-ha","full_name":"crowbar/crowbar-ha","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-ha","description":"HA deployment for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-ha","forks_url":"https://api.github.com/repos/crowbar/crowbar-ha/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-ha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-ha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-ha/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-ha/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-ha/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-ha/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-ha/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-ha/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-ha/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-ha/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-ha/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-ha/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-ha/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-ha/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-ha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-ha/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-ha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-ha/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-ha/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-ha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-ha/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-ha/releases{/id}","created_at":"2015-07-13T10:53:43Z","updated_at":"2015-08-26T19:58:29Z","pushed_at":"2015-09-06T07:12:06Z","git_url":"git://github.com/crowbar/crowbar-ha.git","ssh_url":"git@github.com:crowbar/crowbar-ha.git","clone_url":"https://github.com/crowbar/crowbar-ha.git","svn_url":"https://github.com/crowbar/crowbar-ha","homepage":"","size":1332,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":10,"forks":10,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17"},"html":{"href":"https://github.com/crowbar/crowbar-ha/pull/17"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/issues/17"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/a74f3b593c1c3999ca68571c5af369d3dec9e450"}}}}