{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/comments/31091906","id":31091906,"diff_hunk":"@@ -52,14 +54,103 @@\n     }\n   }\n \n-  # TODO: manage server.cfg contents\n-  if $::mcollective_configured {\n-    file { $::agent_upgrade::params::mcodirs:\n-      ensure => directory,\n+  # manage client.cfg and server.cfg contents\n+  file { $::agent_upgrade::params::mcodirs:\n+    ensure => directory,\n+  }\n+  # The mco_*_config facts will return the location of mcollective config (or nil), prefering PE over FOSS.\n+  if $::mco_server_config {\n+    $mco_server = $::agent_upgrade::params::mco_server\n+    file { $mco_server:\n+      ensure  => file,\n+      source  => $::mco_server_config,\n+    }\n+\n+    if $::mco_server_settings {\n+      $mco_server_libdir = $::mco_server_settings['libdir']\n+      if $mco_server_libdir {\n+        $mco_server_libdir_array = split($mco_server_libdir, ':')\n+        # Only add the new path if it's not already in libdir\n+        if [] == $mco_server_libdir_array.filter |$x| { $x == $::agent_upgrade::params::mco_libdir } {\n+          ini_setting { 'server/libdir':\n+            section => '',\n+            setting => 'libdir',\n+            path    => $mco_server,\n+            value   => \"${mco_server_libdir}:$::agent_upgrade::params::mco_libdir\",\n+            require => File[$mco_server],\n+          }\n+        }\n+      }\n+\n+      $mco_server_plugins = $::mco_server_settings['plugin.yaml']\n+      if $mco_server_plugins {\n+        $mco_server_plugins_array = split($mco_server_plugins, ':')\n+        # Only add the new path if it's not already in plugin.yaml\n+        if [] == $mco_server_plugins_array.filter |$x| { $x == $::agent_upgrade::params::mco_plugins } {\n+          ini_setting { 'server/plugin.yaml':\n+            section => '',\n+            setting => 'plugin.yaml',\n+            path    => $mco_server,\n+            value   => \"${mco_server_plugins}:$::agent_upgrade::params::mco_plugins\",\n+            require => File[$mco_server],\n+          }\n+        }\n+      }\n+    }\n+\n+    ini_setting { 'server/logfile':\n+      section => '',\n+      setting => 'logfile',\n+      path    => $mco_server,\n+      value   => $::agent_upgrade::params::mco_log,\n+      require => File[$mco_server],\n     }\n-    file { $::agent_upgrade::params::mcoserver:\n-      ensure => file,\n-      source => $::agent_upgrade::params::oldmcoserver,\n+  }\n+  if $::mco_client_config {\n+    $mco_client = $::agent_upgrade::params::mco_client\n+    file { $mco_client:\n+      ensure  => file,\n+      source  => $::mco_client_config,\n+    }\n+\n+    if $::mco_client_settings {\n+      $mco_client_libdir = $::mco_client_settings['libdir']\n+      if $mco_client_libdir {\n+        $mco_client_libdir_array = split($mco_client_libdir, ':')\n+        # Only add the new path if it's not already in libdir\n+        if [] == $mco_client_libdir_array.filter |$x| { $x == $::agent_upgrade::params::mco_libdir } {\n+          ini_setting { 'client/libdir':\n+            section => '',\n+            setting => 'libdir',\n+            path    => $mco_client,\n+            value   => \"${mco_client_libdir}:$::agent_upgrade::params::mco_libdir\",\n+            require => File[$mco_client],\n+          }\n+        }\n+      }\n+\n+      $mco_client_plugins = $::mco_client_settings['plugin.yaml']\n+      if $mco_client_plugins {\n+        $mco_client_plugins_array = split($mco_client_plugins, ':')","path":"manifests/prepare.pp","position":97,"original_position":97,"commit_id":"aa718866689bfd156e200a9471d77d7a6927f1a9","original_commit_id":"aa718866689bfd156e200a9471d77d7a6927f1a9","user":{"login":"joshcooper","id":737664,"avatar_url":"https://avatars.githubusercontent.com/u/737664?v=3","gravatar_id":"","url":"https://api.github.com/users/joshcooper","html_url":"https://github.com/joshcooper","followers_url":"https://api.github.com/users/joshcooper/followers","following_url":"https://api.github.com/users/joshcooper/following{/other_user}","gists_url":"https://api.github.com/users/joshcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/joshcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshcooper/subscriptions","organizations_url":"https://api.github.com/users/joshcooper/orgs","repos_url":"https://api.github.com/users/joshcooper/repos","events_url":"https://api.github.com/users/joshcooper/events{/privacy}","received_events_url":"https://api.github.com/users/joshcooper/received_events","type":"User","site_admin":false},"body":"same platform splitting issue","created_at":"2015-05-26T23:55:19Z","updated_at":"2015-05-26T23:55:19Z","html_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade/pull/11#discussion_r31091906","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/comments/31091906"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-agent_upgrade/pull/11#discussion_r31091906"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11","id":35955455,"html_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade/pull/11","diff_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade/pull/11.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade/pull/11.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues/11","number":11,"state":"open","locked":false,"title":"(PUP-4560) Add mcollective support","user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars.githubusercontent.com/u/8162496?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"body":"Adds migrating mcollective configuration - client.cfg and server.cfg -\r\nto the new expected locations; and updating logdir, libdir, and\r\nplugin.yaml to account for new locations.","created_at":"2015-05-21T17:02:51Z","updated_at":"2015-05-26T23:55:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d418d3611f7b26d96a5c39cc368cb8300032dee5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues/11/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/statuses/aa718866689bfd156e200a9471d77d7a6927f1a9","head":{"label":"MikaelSmith:task/master/PUP-4560-mco","ref":"task/master/PUP-4560-mco","sha":"aa718866689bfd156e200a9471d77d7a6927f1a9","user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars.githubusercontent.com/u/8162496?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"repo":{"id":35250987,"name":"puppetlabs-agent_upgrade","full_name":"MikaelSmith/puppetlabs-agent_upgrade","owner":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars.githubusercontent.com/u/8162496?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MikaelSmith/puppetlabs-agent_upgrade","description":"","fork":true,"url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade","forks_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/forks","keys_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/teams","hooks_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/hooks","issue_events_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/issues/events{/number}","events_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/events","assignees_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/assignees{/user}","branches_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/branches{/branch}","tags_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/tags","blobs_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/statuses/{sha}","languages_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/languages","stargazers_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/stargazers","contributors_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/contributors","subscribers_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/subscribers","subscription_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/subscription","commits_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/contents/{+path}","compare_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/merges","archive_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/downloads","issues_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/issues{/number}","pulls_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/pulls{/number}","milestones_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/milestones{/number}","notifications_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/labels{/name}","releases_url":"https://api.github.com/repos/MikaelSmith/puppetlabs-agent_upgrade/releases{/id}","created_at":"2015-05-08T00:55:48Z","updated_at":"2015-05-12T21:37:05Z","pushed_at":"2015-05-26T22:55:39Z","git_url":"git://github.com/MikaelSmith/puppetlabs-agent_upgrade.git","ssh_url":"git@github.com:MikaelSmith/puppetlabs-agent_upgrade.git","clone_url":"https://github.com/MikaelSmith/puppetlabs-agent_upgrade.git","svn_url":"https://github.com/MikaelSmith/puppetlabs-agent_upgrade","homepage":null,"size":373,"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":"puppetlabs:master","ref":"master","sha":"db45b902927db18b3639394ed2dcf7b3c1d90da7","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":35058943,"name":"puppetlabs-agent_upgrade","full_name":"puppetlabs/puppetlabs-agent_upgrade","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade","description":"Module for upgrading Puppet 3.8 to Puppet-Agent in PC1","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/releases{/id}","created_at":"2015-05-04T20:50:16Z","updated_at":"2015-05-12T21:31:55Z","pushed_at":"2015-05-26T23:45:41Z","git_url":"git://github.com/puppetlabs/puppetlabs-agent_upgrade.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-agent_upgrade.git","clone_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade.git","svn_url":"https://github.com/puppetlabs/puppetlabs-agent_upgrade","homepage":"https://tickets.puppetlabs.com/browse/PUP","size":559,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-agent_upgrade/pull/11"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues/11"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-agent_upgrade/statuses/aa718866689bfd156e200a9471d77d7a6927f1a9"}}}}