{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/cookbook-elasticsearch/issues/472","repository_url":"https://api.github.com/repos/elastic/cookbook-elasticsearch","labels_url":"https://api.github.com/repos/elastic/cookbook-elasticsearch/issues/472/labels{/name}","comments_url":"https://api.github.com/repos/elastic/cookbook-elasticsearch/issues/472/comments","events_url":"https://api.github.com/repos/elastic/cookbook-elasticsearch/issues/472/events","html_url":"https://github.com/elastic/cookbook-elasticsearch/issues/472","id":160398399,"number":472,"title":"elasticsearch_configure needs elasticsearch_install?","user":{"login":"mikkoc","id":6280048,"avatar_url":"https://avatars.githubusercontent.com/u/6280048?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkoc","html_url":"https://github.com/mikkoc","followers_url":"https://api.github.com/users/mikkoc/followers","following_url":"https://api.github.com/users/mikkoc/following{/other_user}","gists_url":"https://api.github.com/users/mikkoc/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkoc/subscriptions","organizations_url":"https://api.github.com/users/mikkoc/orgs","repos_url":"https://api.github.com/users/mikkoc/repos","events_url":"https://api.github.com/users/mikkoc/events{/privacy}","received_events_url":"https://api.github.com/users/mikkoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-15T11:21:18Z","updated_at":"2016-06-15T13:30:24Z","closed_at":null,"body":"Hello,\r\n\r\nin my wrapper cookbook I'm installing the elasticsearch package via yum repos:\r\n```\r\nelasticsearch_user 'elasticsearch'\r\n\r\npackage 'elasticsearch'\r\n\r\nelasticsearch_configure 'elasticsearch' do\r\n  configuration ({\r\n    'network.bind_host' => '0.0.0.0'\r\n  })\r\nend\r\n```\r\n\r\nThis fails with:\r\n```\r\n  * yum_package[elasticsearch] action install (up to date)\r\n  * elasticsearch_configure[elasticsearch] action manage\r\n    \r\n    ================================================================================\r\n    Error executing action `manage` on resource 'elasticsearch_configure[elasticsearch]'\r\n    ================================================================================\r\n    \r\n    RuntimeError\r\n    ------------\r\n    Could not find exactly one elasticsearch_install resource, and no specific resource or instance name was given\r\n    \r\n    Cookbook Trace:\r\n    ---------------\r\n    /var/chef/cache/cookbooks/elasticsearch/libraries/helpers.rb:24:in `find_es_resource'\r\n    /var/chef/cache/cookbooks/elasticsearch/libraries/provider_configure.rb:14:in `block in <class:ConfigureProvider>'\r\n    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'\r\n```\r\n\r\nHow can I work around this? I tried passing `instance_name 'elasticsearch'` but it does not work.\r\n\r\nNo, we cannot fetch packages from anywhere else than our (internal) yum repos.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/elastic/cookbook-elasticsearch/issues/comments/226187303","html_url":"https://github.com/elastic/cookbook-elasticsearch/issues/472#issuecomment-226187303","issue_url":"https://api.github.com/repos/elastic/cookbook-elasticsearch/issues/472","id":226187303,"user":{"login":"martinb3","id":103033,"avatar_url":"https://avatars.githubusercontent.com/u/103033?v=3","gravatar_id":"","url":"https://api.github.com/users/martinb3","html_url":"https://github.com/martinb3","followers_url":"https://api.github.com/users/martinb3/followers","following_url":"https://api.github.com/users/martinb3/following{/other_user}","gists_url":"https://api.github.com/users/martinb3/gists{/gist_id}","starred_url":"https://api.github.com/users/martinb3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinb3/subscriptions","organizations_url":"https://api.github.com/users/martinb3/orgs","repos_url":"https://api.github.com/users/martinb3/repos","events_url":"https://api.github.com/users/martinb3/events{/privacy}","received_events_url":"https://api.github.com/users/martinb3/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T13:30:24Z","updated_at":"2016-06-15T13:30:24Z","body":"Hi there -- the best workaround is to still create an `elasticsearch_install` resource, and just set all the paths on it. `elasticsearch_configure` looks for the install resource to inform it about where to find various paths.\r\n\r\nAlso, you're able to steer the `elasticsearch_install` resource to install a package from any URL, including your own internal repos, so that might provide you with a reasonable workaround too.\r\n\r\nHope this helps!"}}
{"actor":{"display_login":"martinb3"}}