{"action":"created","issue":{"url":"https://api.github.com/repos/adamkrone/chef-consul-template/issues/43","repository_url":"https://api.github.com/repos/adamkrone/chef-consul-template","labels_url":"https://api.github.com/repos/adamkrone/chef-consul-template/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/adamkrone/chef-consul-template/issues/43/comments","events_url":"https://api.github.com/repos/adamkrone/chef-consul-template/issues/43/events","html_url":"https://github.com/adamkrone/chef-consul-template/pull/43","id":128043905,"number":43,"title":"Allow install_binary recipe to be run by itself.","user":{"login":"mjcdiggity","id":1402084,"avatar_url":"https://avatars.githubusercontent.com/u/1402084?v=3","gravatar_id":"","url":"https://api.github.com/users/mjcdiggity","html_url":"https://github.com/mjcdiggity","followers_url":"https://api.github.com/users/mjcdiggity/followers","following_url":"https://api.github.com/users/mjcdiggity/following{/other_user}","gists_url":"https://api.github.com/users/mjcdiggity/gists{/gist_id}","starred_url":"https://api.github.com/users/mjcdiggity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjcdiggity/subscriptions","organizations_url":"https://api.github.com/users/mjcdiggity/orgs","repos_url":"https://api.github.com/users/mjcdiggity/repos","events_url":"https://api.github.com/users/mjcdiggity/events{/privacy}","received_events_url":"https://api.github.com/users/mjcdiggity/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-21T23:14:57Z","updated_at":"2016-02-09T01:35:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/adamkrone/chef-consul-template/pulls/43","html_url":"https://github.com/adamkrone/chef-consul-template/pull/43","diff_url":"https://github.com/adamkrone/chef-consul-template/pull/43.diff","patch_url":"https://github.com/adamkrone/chef-consul-template/pull/43.patch"},"body":"There are still some tests that failed while running test kitchen, but I wanted to check if this was an agreed upon way of resolving this issue. \r\n\r\nI can/will add specs/tests before this is merged. \r\n\r\nMy use case is simply installing the binary. \r\n"},"comment":{"url":"https://api.github.com/repos/adamkrone/chef-consul-template/issues/comments/181660663","html_url":"https://github.com/adamkrone/chef-consul-template/pull/43#issuecomment-181660663","issue_url":"https://api.github.com/repos/adamkrone/chef-consul-template/issues/43","id":181660663,"user":{"login":"mjcdiggity","id":1402084,"avatar_url":"https://avatars.githubusercontent.com/u/1402084?v=3","gravatar_id":"","url":"https://api.github.com/users/mjcdiggity","html_url":"https://github.com/mjcdiggity","followers_url":"https://api.github.com/users/mjcdiggity/followers","following_url":"https://api.github.com/users/mjcdiggity/following{/other_user}","gists_url":"https://api.github.com/users/mjcdiggity/gists{/gist_id}","starred_url":"https://api.github.com/users/mjcdiggity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjcdiggity/subscriptions","organizations_url":"https://api.github.com/users/mjcdiggity/orgs","repos_url":"https://api.github.com/users/mjcdiggity/repos","events_url":"https://api.github.com/users/mjcdiggity/events{/privacy}","received_events_url":"https://api.github.com/users/mjcdiggity/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T01:35:39Z","updated_at":"2016-02-09T01:35:39Z","body":"So I am trying to determine if the `consul-template` service is or will be present.\r\n\r\nMy first attempt involves: \r\n\r\n``` ruby\r\nrun_context.resource_collection.find do |r|\r\n    r.name == 'consul-template'\r\nend\r\n```\r\n \r\nThis is used as an only if guard to the [`libarchive_file`](https://github.com/adamkrone/chef-consul-template/blob/master/recipes/install_binary.rb#L36-L43) resource. However, the resource at that time does not seem to have `service[consul-template]` defined, so not sure how else to solve this problem. \r\n\r\nDon't have an answer to this problem yet, but I'll keep thinking. "}}