{"action":"created","issue":{"url":"https://api.github.com/repos/sensu/sensu-puppet/issues/313","labels_url":"https://api.github.com/repos/sensu/sensu-puppet/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/sensu/sensu-puppet/issues/313/comments","events_url":"https://api.github.com/repos/sensu/sensu-puppet/issues/313/events","html_url":"https://github.com/sensu/sensu-puppet/pull/313","id":57265890,"number":313,"title":"Keepalived config not merged since you are specifying the json in the puppet hash variable","user":{"login":"victorgp","id":593300,"avatar_url":"https://avatars.githubusercontent.com/u/593300?v=3","gravatar_id":"","url":"https://api.github.com/users/victorgp","html_url":"https://github.com/victorgp","followers_url":"https://api.github.com/users/victorgp/followers","following_url":"https://api.github.com/users/victorgp/following{/other_user}","gists_url":"https://api.github.com/users/victorgp/gists{/gist_id}","starred_url":"https://api.github.com/users/victorgp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorgp/subscriptions","organizations_url":"https://api.github.com/users/victorgp/orgs","repos_url":"https://api.github.com/users/victorgp/repos","events_url":"https://api.github.com/users/victorgp/events{/privacy}","received_events_url":"https://api.github.com/users/victorgp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-11T01:41:25Z","updated_at":"2015-04-07T21:28:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sensu/sensu-puppet/pulls/313","html_url":"https://github.com/sensu/sensu-puppet/pull/313","diff_url":"https://github.com/sensu/sensu-puppet/pull/313.diff","patch_url":"https://github.com/sensu/sensu-puppet/pull/313.patch"},"body":"I think the config json shouldn't be merged, but just applied as it is because you are defining the actual hash in the puppet variable. Why?\r\nBecause i've been having this issue:\r\n\r\nThis was my client config file\r\n```json\r\n{\r\n  \"client\": {\r\n    \"name\": \"myhost\",\r\n    \"address\": \"123.123.123.123\",\r\n    \"bind\": \"127.0.0.1\",\r\n    \"keepalive\": {\r\n      \"extra_useless_parameter\": 100,\r\n      \"thresholds\": {\r\n        \"warning\": 300,\r\n        \"critical\": 600\r\n      },\r\n      \"handlers\": [\r\n        \"default\",\r\n        \"mailer\"\r\n      ],\r\n      \"occurrences\": 5,\r\n      \"refresh\": 2702\r\n    },\r\n  }\r\n}\r\n```\r\n\r\nI wanted to remove that \"extra_useless_parameter\", so i removed it in puppet. This sensu-puppet module is aware that the config file values changed, so it notifies the sensu service and provokes a restart.\r\nSo far, so good, the problem is that the \"sensu_client_config\" resource that you created, is not removing that \"extra_useless_value\" because is doing a json merge between the old config file and the new values, therefore the state of the config file is exactly the same as the previous one. This is causing that everytime puppet runs, it notifies the sensu service and restart it forever and ever."},"comment":{"url":"https://api.github.com/repos/sensu/sensu-puppet/issues/comments/90737640","html_url":"https://github.com/sensu/sensu-puppet/pull/313#issuecomment-90737640","issue_url":"https://api.github.com/repos/sensu/sensu-puppet/issues/313","id":90737640,"user":{"login":"jamtur01","id":4365,"avatar_url":"https://avatars.githubusercontent.com/u/4365?v=3","gravatar_id":"","url":"https://api.github.com/users/jamtur01","html_url":"https://github.com/jamtur01","followers_url":"https://api.github.com/users/jamtur01/followers","following_url":"https://api.github.com/users/jamtur01/following{/other_user}","gists_url":"https://api.github.com/users/jamtur01/gists{/gist_id}","starred_url":"https://api.github.com/users/jamtur01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamtur01/subscriptions","organizations_url":"https://api.github.com/users/jamtur01/orgs","repos_url":"https://api.github.com/users/jamtur01/repos","events_url":"https://api.github.com/users/jamtur01/events{/privacy}","received_events_url":"https://api.github.com/users/jamtur01/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T21:28:34Z","updated_at":"2015-04-07T21:28:34Z","body":"@victorgp Why not handle it like the existing `custom` method?"}}