{"action":"created","issue":{"url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/issues/25","labels_url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/issues/25/comments","events_url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/issues/25/events","html_url":"https://github.com/opscode-cookbooks/enterprise-chef-common/pull/25","id":54193027,"number":25,"title":"Add systemd support","user":{"login":"chewi","id":35072,"avatar_url":"https://avatars.githubusercontent.com/u/35072?v=3","gravatar_id":"","url":"https://api.github.com/users/chewi","html_url":"https://github.com/chewi","followers_url":"https://api.github.com/users/chewi/followers","following_url":"https://api.github.com/users/chewi/following{/other_user}","gists_url":"https://api.github.com/users/chewi/gists{/gist_id}","starred_url":"https://api.github.com/users/chewi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chewi/subscriptions","organizations_url":"https://api.github.com/users/chewi/orgs","repos_url":"https://api.github.com/users/chewi/repos","events_url":"https://api.github.com/users/chewi/events{/privacy}","received_events_url":"https://api.github.com/users/chewi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-13T13:23:39Z","updated_at":"2015-01-22T11:12:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/pulls/25","html_url":"https://github.com/opscode-cookbooks/enterprise-chef-common/pull/25","diff_url":"https://github.com/opscode-cookbooks/enterprise-chef-common/pull/25.diff","patch_url":"https://github.com/opscode-cookbooks/enterprise-chef-common/pull/25.patch"},"body":"This is the magic sauce needed to make Chef Server install on CentOS 7 and hopefully Debian Jessie as well, though I haven't tested the latter. It doesn't need distro-specific rules because checking `node['init_package']` is sufficient to determine whether systemd is being used or not.\r\n\r\nI'm guessing there's a reason why you're not using the regular `service` resource in the other recipes so I didn't use it here either.\r\n\r\nI could not get the specs to run for the life of me. Some problem with the RSpec version or ChefDK? I'm not familiar with ChefSpec but I'm guessing that giving it `redhat/7.0` won't be enough for it to determine that it should use systemd."},"comment":{"url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/issues/comments/71005433","html_url":"https://github.com/opscode-cookbooks/enterprise-chef-common/pull/25#issuecomment-71005433","issue_url":"https://api.github.com/repos/opscode-cookbooks/enterprise-chef-common/issues/25","id":71005433,"user":{"login":"chewi","id":35072,"avatar_url":"https://avatars.githubusercontent.com/u/35072?v=3","gravatar_id":"","url":"https://api.github.com/users/chewi","html_url":"https://github.com/chewi","followers_url":"https://api.github.com/users/chewi/followers","following_url":"https://api.github.com/users/chewi/following{/other_user}","gists_url":"https://api.github.com/users/chewi/gists{/gist_id}","starred_url":"https://api.github.com/users/chewi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chewi/subscriptions","organizations_url":"https://api.github.com/users/chewi/orgs","repos_url":"https://api.github.com/users/chewi/repos","events_url":"https://api.github.com/users/chewi/events{/privacy}","received_events_url":"https://api.github.com/users/chewi/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T11:12:39Z","updated_at":"2015-01-22T11:12:39Z","body":"Following all that feedback, I've had another stab at this. Using `service` works but I have to add `provider Chef::Provider::Service::Systemd`. I suspect this is only necessary for Chef Client 11 as the detection has completely changed in 12.\r\n\r\nI figured the `gsub` was completely unnecessary as this was only added to prevent breaking Upstart on upgrades. Since the systemd support is entirely new, that's not an issue here."}}