{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/524","labels_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/524/labels{/name}","comments_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/524/comments","events_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/524/events","html_url":"https://github.com/elastic/puppet-elasticsearch/issues/524","id":122481527,"number":524,"title":"plugin install not handling return code 74 for 'Already installed'","user":{"login":"thenom","id":3070415,"avatar_url":"https://avatars.githubusercontent.com/u/3070415?v=3","gravatar_id":"","url":"https://api.github.com/users/thenom","html_url":"https://github.com/thenom","followers_url":"https://api.github.com/users/thenom/followers","following_url":"https://api.github.com/users/thenom/following{/other_user}","gists_url":"https://api.github.com/users/thenom/gists{/gist_id}","starred_url":"https://api.github.com/users/thenom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenom/subscriptions","organizations_url":"https://api.github.com/users/thenom/orgs","repos_url":"https://api.github.com/users/thenom/repos","events_url":"https://api.github.com/users/thenom/events{/privacy}","received_events_url":"https://api.github.com/users/thenom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-12-16T11:20:59Z","updated_at":"2015-12-16T14:51:44Z","closed_at":"2015-12-16T13:47:12Z","body":"Hi,\r\n\r\nThanks for the update for ES2.  I am just redoing my puppet code and hiera and it seems that the plugin install work fine first time round and then subsequent runs file due to ES returning exit code 74\r\n\r\n```\r\nError: Execution of '/usr/share/elasticsearch/bin/plugin install file:///opt/elasticsearch/swdl/license-2.1.0.zip' returned 74: -> Installing from file:/opt/elasticsearch/swdl/license-2.1.0.zip...\r\nTrying file:/opt/elasticsearch/swdl/license-2.1.0.zip ...\r\nDownloading .DONE\r\nVerifying file:/opt/elasticsearch/swdl/license-2.1.0.zip checksums if available ...\r\nNOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)\r\nERROR: plugin directory /usr/share/elasticsearch/plugins/license already exists. To update the plugin, uninstall it first using 'remove license' command\r\nError: /Stage[main]/Profiles::Elasticsearch/Elasticsearch::Plugin[licence]/Elasticsearch_plugin[licence]/ensure: change from absent to present failed: Execution of '/usr/share/elasticsearch/bin/plugin install file:///opt/elasticsearch/swdl/license-2.1.0.zip' returned 74: -> Installing from file:/opt/elasticsearch/swdl/license-2.1.0.zip...\r\n```\r\n\r\nDoes this exit code need catching or is it just me mis-reading the docs?  This is my code:\r\n\r\n```\r\n        ::elasticsearch::plugin{'licence':\r\n            instances => $es_shield_instances,\r\n            source    => $licence_source,\r\n            ensure    => present,\r\n        }\r\n```\r\n\r\nand hiera:\r\n\r\n```\r\nprofiles::elasticsearch::licence_source: 'puppet:///modules/profiles/elasticsearch/license-2.1.0.zip'\r\nprofiles::elasticsearch::es_shield_instances:\r\n    - es-01\r\n    - es-02\r\n```\r\n\r\nThanks again"},"comment":{"url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/comments/165131734","html_url":"https://github.com/elastic/puppet-elasticsearch/issues/524#issuecomment-165131734","issue_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/524","id":165131734,"user":{"login":"electrical","id":271677,"avatar_url":"https://avatars.githubusercontent.com/u/271677?v=3","gravatar_id":"","url":"https://api.github.com/users/electrical","html_url":"https://github.com/electrical","followers_url":"https://api.github.com/users/electrical/followers","following_url":"https://api.github.com/users/electrical/following{/other_user}","gists_url":"https://api.github.com/users/electrical/gists{/gist_id}","starred_url":"https://api.github.com/users/electrical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrical/subscriptions","organizations_url":"https://api.github.com/users/electrical/orgs","repos_url":"https://api.github.com/users/electrical/repos","events_url":"https://api.github.com/users/electrical/events{/privacy}","received_events_url":"https://api.github.com/users/electrical/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T14:51:44Z","updated_at":"2015-12-16T14:51:44Z","body":"No problem at all!"}}