{"action":"created","comment":{"url":"https://api.github.com/repos/echocat/puppet-redis/pulls/comments/31129307","id":31129307,"diff_hunk":"@@ -14,17 +14,43 @@\n # [*redis_install_dir*]\n #   The dir to which the newly built redis binaries are copied. Default value is '/usr/bin'.\n #\n+# [*manage_repo*]\n+#   Configure if this module should maintain repos for the redis package. Default: false\n+#   Requires redis_package set to true.\n+#   Currently only supports Ubuntu PPA (ppa:chris-lea/redis-server).\n+#\n class redis::install (\n   $redis_version     = $::redis::params::redis_version,\n   $redis_build_dir   = $::redis::params::redis_build_dir,\n   $redis_install_dir = $::redis::params::redis_install_dir,\n   $redis_package     = $::redis::params::redis_install_package,\n+  $manage_repo       = $::redis::params::manage_repo,\n   $download_tool     = $::redis::params::download_tool\n ) inherits redis {\n-  if ( $redis_package == true ) {\n+\n+  validate_bool($manage_repo)\n+  validate_bool($redis_package)\n+\n+  if ( $manage_repo == true and $redis_package == false ) {\n+    fail('manage_repo requires redis_package.')\n+  }\n+\n+  if $redis_package {\n     case $::operatingsystem {\n-      'Debian', 'Ubuntu': {\n-        package { 'redis-server' : ensure => $redis_version, }\n+      'Ubuntu': {\n+        if $manage_repo {\n+          class { '::redis::repo': } ->\n+          Anchor['redis::repo::begin']\n+\n+          anchor { 'redis::repo::begin': } ->\n+            package { 'redis-server' : ensure => $redis_version, }\n+          anchor { 'php::end': }","path":"manifests/install.pp","position":null,"original_position":37,"commit_id":"7651e2fb3dac0cb6559d98081d63f869c18f99c0","original_commit_id":"9f8ff8543fc2f6e2a16f6cfe6a42fb5f0f347fd7","user":{"login":"adepretis","id":587018,"avatar_url":"https://avatars.githubusercontent.com/u/587018?v=3","gravatar_id":"","url":"https://api.github.com/users/adepretis","html_url":"https://github.com/adepretis","followers_url":"https://api.github.com/users/adepretis/followers","following_url":"https://api.github.com/users/adepretis/following{/other_user}","gists_url":"https://api.github.com/users/adepretis/gists{/gist_id}","starred_url":"https://api.github.com/users/adepretis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adepretis/subscriptions","organizations_url":"https://api.github.com/users/adepretis/orgs","repos_url":"https://api.github.com/users/adepretis/repos","events_url":"https://api.github.com/users/adepretis/events{/privacy}","received_events_url":"https://api.github.com/users/adepretis/received_events","type":"User","site_admin":false},"body":"Sorry - fixed this. The solution was inspired by mayflower-php puppet module; copy/paste error :-(","created_at":"2015-05-27T12:49:43Z","updated_at":"2015-05-27T12:49:43Z","html_url":"https://github.com/echocat/puppet-redis/pull/27#discussion_r31129307","pull_request_url":"https://api.github.com/repos/echocat/puppet-redis/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/echocat/puppet-redis/pulls/comments/31129307"},"html":{"href":"https://github.com/echocat/puppet-redis/pull/27#discussion_r31129307"},"pull_request":{"href":"https://api.github.com/repos/echocat/puppet-redis/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/echocat/puppet-redis/pulls/27","id":36298360,"html_url":"https://github.com/echocat/puppet-redis/pull/27","diff_url":"https://github.com/echocat/puppet-redis/pull/27.diff","patch_url":"https://github.com/echocat/puppet-redis/pull/27.patch","issue_url":"https://api.github.com/repos/echocat/puppet-redis/issues/27","number":27,"state":"open","locked":false,"title":"Added support for Ubuntu PPA (chris-lea/redis-server)","user":{"login":"adepretis","id":587018,"avatar_url":"https://avatars.githubusercontent.com/u/587018?v=3","gravatar_id":"","url":"https://api.github.com/users/adepretis","html_url":"https://github.com/adepretis","followers_url":"https://api.github.com/users/adepretis/followers","following_url":"https://api.github.com/users/adepretis/following{/other_user}","gists_url":"https://api.github.com/users/adepretis/gists{/gist_id}","starred_url":"https://api.github.com/users/adepretis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adepretis/subscriptions","organizations_url":"https://api.github.com/users/adepretis/orgs","repos_url":"https://api.github.com/users/adepretis/repos","events_url":"https://api.github.com/users/adepretis/events{/privacy}","received_events_url":"https://api.github.com/users/adepretis/received_events","type":"User","site_admin":false},"body":"+) added manage_repo parameter for class 'redis::install'\r\n+) added tests","created_at":"2015-05-27T12:31:39Z","updated_at":"2015-05-27T12:49:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"277c77935a534bb3092135e635d6a387e56a8993","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/echocat/puppet-redis/pulls/27/commits","review_comments_url":"https://api.github.com/repos/echocat/puppet-redis/pulls/27/comments","review_comment_url":"https://api.github.com/repos/echocat/puppet-redis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/echocat/puppet-redis/issues/27/comments","statuses_url":"https://api.github.com/repos/echocat/puppet-redis/statuses/7651e2fb3dac0cb6559d98081d63f869c18f99c0","head":{"label":"25th-floor:feature/support_ubuntu_ppa","ref":"feature/support_ubuntu_ppa","sha":"7651e2fb3dac0cb6559d98081d63f869c18f99c0","user":{"login":"25th-floor","id":166272,"avatar_url":"https://avatars.githubusercontent.com/u/166272?v=3","gravatar_id":"","url":"https://api.github.com/users/25th-floor","html_url":"https://github.com/25th-floor","followers_url":"https://api.github.com/users/25th-floor/followers","following_url":"https://api.github.com/users/25th-floor/following{/other_user}","gists_url":"https://api.github.com/users/25th-floor/gists{/gist_id}","starred_url":"https://api.github.com/users/25th-floor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/25th-floor/subscriptions","organizations_url":"https://api.github.com/users/25th-floor/orgs","repos_url":"https://api.github.com/users/25th-floor/repos","events_url":"https://api.github.com/users/25th-floor/events{/privacy}","received_events_url":"https://api.github.com/users/25th-floor/received_events","type":"Organization","site_admin":false},"repo":{"id":36360739,"name":"puppet-redis","full_name":"25th-floor/puppet-redis","owner":{"login":"25th-floor","id":166272,"avatar_url":"https://avatars.githubusercontent.com/u/166272?v=3","gravatar_id":"","url":"https://api.github.com/users/25th-floor","html_url":"https://github.com/25th-floor","followers_url":"https://api.github.com/users/25th-floor/followers","following_url":"https://api.github.com/users/25th-floor/following{/other_user}","gists_url":"https://api.github.com/users/25th-floor/gists{/gist_id}","starred_url":"https://api.github.com/users/25th-floor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/25th-floor/subscriptions","organizations_url":"https://api.github.com/users/25th-floor/orgs","repos_url":"https://api.github.com/users/25th-floor/repos","events_url":"https://api.github.com/users/25th-floor/events{/privacy}","received_events_url":"https://api.github.com/users/25th-floor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/25th-floor/puppet-redis","description":"Puppet module to install and configure redis service from internet sources","fork":true,"url":"https://api.github.com/repos/25th-floor/puppet-redis","forks_url":"https://api.github.com/repos/25th-floor/puppet-redis/forks","keys_url":"https://api.github.com/repos/25th-floor/puppet-redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/25th-floor/puppet-redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/25th-floor/puppet-redis/teams","hooks_url":"https://api.github.com/repos/25th-floor/puppet-redis/hooks","issue_events_url":"https://api.github.com/repos/25th-floor/puppet-redis/issues/events{/number}","events_url":"https://api.github.com/repos/25th-floor/puppet-redis/events","assignees_url":"https://api.github.com/repos/25th-floor/puppet-redis/assignees{/user}","branches_url":"https://api.github.com/repos/25th-floor/puppet-redis/branches{/branch}","tags_url":"https://api.github.com/repos/25th-floor/puppet-redis/tags","blobs_url":"https://api.github.com/repos/25th-floor/puppet-redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/25th-floor/puppet-redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/25th-floor/puppet-redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/25th-floor/puppet-redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/25th-floor/puppet-redis/statuses/{sha}","languages_url":"https://api.github.com/repos/25th-floor/puppet-redis/languages","stargazers_url":"https://api.github.com/repos/25th-floor/puppet-redis/stargazers","contributors_url":"https://api.github.com/repos/25th-floor/puppet-redis/contributors","subscribers_url":"https://api.github.com/repos/25th-floor/puppet-redis/subscribers","subscription_url":"https://api.github.com/repos/25th-floor/puppet-redis/subscription","commits_url":"https://api.github.com/repos/25th-floor/puppet-redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/25th-floor/puppet-redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/25th-floor/puppet-redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/25th-floor/puppet-redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/25th-floor/puppet-redis/contents/{+path}","compare_url":"https://api.github.com/repos/25th-floor/puppet-redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/25th-floor/puppet-redis/merges","archive_url":"https://api.github.com/repos/25th-floor/puppet-redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/25th-floor/puppet-redis/downloads","issues_url":"https://api.github.com/repos/25th-floor/puppet-redis/issues{/number}","pulls_url":"https://api.github.com/repos/25th-floor/puppet-redis/pulls{/number}","milestones_url":"https://api.github.com/repos/25th-floor/puppet-redis/milestones{/number}","notifications_url":"https://api.github.com/repos/25th-floor/puppet-redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/25th-floor/puppet-redis/labels{/name}","releases_url":"https://api.github.com/repos/25th-floor/puppet-redis/releases{/id}","created_at":"2015-05-27T10:49:23Z","updated_at":"2015-05-27T10:49:24Z","pushed_at":"2015-05-27T12:48:13Z","git_url":"git://github.com/25th-floor/puppet-redis.git","ssh_url":"git@github.com:25th-floor/puppet-redis.git","clone_url":"https://github.com/25th-floor/puppet-redis.git","svn_url":"https://github.com/25th-floor/puppet-redis","homepage":null,"size":599,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"echocat:master","ref":"master","sha":"194474691416446a220e2bf45149a4644c7b9bb3","user":{"login":"echocat","id":3128980,"avatar_url":"https://avatars.githubusercontent.com/u/3128980?v=3","gravatar_id":"","url":"https://api.github.com/users/echocat","html_url":"https://github.com/echocat","followers_url":"https://api.github.com/users/echocat/followers","following_url":"https://api.github.com/users/echocat/following{/other_user}","gists_url":"https://api.github.com/users/echocat/gists{/gist_id}","starred_url":"https://api.github.com/users/echocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echocat/subscriptions","organizations_url":"https://api.github.com/users/echocat/orgs","repos_url":"https://api.github.com/users/echocat/repos","events_url":"https://api.github.com/users/echocat/events{/privacy}","received_events_url":"https://api.github.com/users/echocat/received_events","type":"Organization","site_admin":false},"repo":{"id":6724253,"name":"puppet-redis","full_name":"echocat/puppet-redis","owner":{"login":"echocat","id":3128980,"avatar_url":"https://avatars.githubusercontent.com/u/3128980?v=3","gravatar_id":"","url":"https://api.github.com/users/echocat","html_url":"https://github.com/echocat","followers_url":"https://api.github.com/users/echocat/followers","following_url":"https://api.github.com/users/echocat/following{/other_user}","gists_url":"https://api.github.com/users/echocat/gists{/gist_id}","starred_url":"https://api.github.com/users/echocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/echocat/subscriptions","organizations_url":"https://api.github.com/users/echocat/orgs","repos_url":"https://api.github.com/users/echocat/repos","events_url":"https://api.github.com/users/echocat/events{/privacy}","received_events_url":"https://api.github.com/users/echocat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/echocat/puppet-redis","description":"Puppet module to install and configure redis service from internet sources","fork":false,"url":"https://api.github.com/repos/echocat/puppet-redis","forks_url":"https://api.github.com/repos/echocat/puppet-redis/forks","keys_url":"https://api.github.com/repos/echocat/puppet-redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/echocat/puppet-redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/echocat/puppet-redis/teams","hooks_url":"https://api.github.com/repos/echocat/puppet-redis/hooks","issue_events_url":"https://api.github.com/repos/echocat/puppet-redis/issues/events{/number}","events_url":"https://api.github.com/repos/echocat/puppet-redis/events","assignees_url":"https://api.github.com/repos/echocat/puppet-redis/assignees{/user}","branches_url":"https://api.github.com/repos/echocat/puppet-redis/branches{/branch}","tags_url":"https://api.github.com/repos/echocat/puppet-redis/tags","blobs_url":"https://api.github.com/repos/echocat/puppet-redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/echocat/puppet-redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/echocat/puppet-redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/echocat/puppet-redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/echocat/puppet-redis/statuses/{sha}","languages_url":"https://api.github.com/repos/echocat/puppet-redis/languages","stargazers_url":"https://api.github.com/repos/echocat/puppet-redis/stargazers","contributors_url":"https://api.github.com/repos/echocat/puppet-redis/contributors","subscribers_url":"https://api.github.com/repos/echocat/puppet-redis/subscribers","subscription_url":"https://api.github.com/repos/echocat/puppet-redis/subscription","commits_url":"https://api.github.com/repos/echocat/puppet-redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/echocat/puppet-redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/echocat/puppet-redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/echocat/puppet-redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/echocat/puppet-redis/contents/{+path}","compare_url":"https://api.github.com/repos/echocat/puppet-redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/echocat/puppet-redis/merges","archive_url":"https://api.github.com/repos/echocat/puppet-redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/echocat/puppet-redis/downloads","issues_url":"https://api.github.com/repos/echocat/puppet-redis/issues{/number}","pulls_url":"https://api.github.com/repos/echocat/puppet-redis/pulls{/number}","milestones_url":"https://api.github.com/repos/echocat/puppet-redis/milestones{/number}","notifications_url":"https://api.github.com/repos/echocat/puppet-redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/echocat/puppet-redis/labels{/name}","releases_url":"https://api.github.com/repos/echocat/puppet-redis/releases{/id}","created_at":"2012-11-16T16:16:52Z","updated_at":"2015-05-08T11:31:07Z","pushed_at":"2015-05-27T12:48:13Z","git_url":"git://github.com/echocat/puppet-redis.git","ssh_url":"git@github.com:echocat/puppet-redis.git","clone_url":"https://github.com/echocat/puppet-redis.git","svn_url":"https://github.com/echocat/puppet-redis","homepage":null,"size":599,"stargazers_count":10,"watchers_count":10,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":3,"forks":29,"open_issues":3,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/echocat/puppet-redis/pulls/27"},"html":{"href":"https://github.com/echocat/puppet-redis/pull/27"},"issue":{"href":"https://api.github.com/repos/echocat/puppet-redis/issues/27"},"comments":{"href":"https://api.github.com/repos/echocat/puppet-redis/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/echocat/puppet-redis/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/echocat/puppet-redis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/echocat/puppet-redis/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/echocat/puppet-redis/statuses/7651e2fb3dac0cb6559d98081d63f869c18f99c0"}}}}