elasticsearch/cookbook-elasticsearch — pull request #242 by jakekdodd (2014-10-07 14:13:18+00:00)
Title: computation of dowload url moved to recipe

Computation of the download filename and download URL in the defaults.rb attributes file was causing potentially confusing behavior upon node convergence. If the user overrode the node.elasticsearch[:version] property, the download directory and symlinks would be created with the correctly overridden version number. However, the download URL would be computed with the default version number, and thus the incorrect, default version of elasticsearch would be installed.

Since there's no need to compute the download filename and URL until node convergence, this pull request moves that computation to the default.rb recipe. However, the node.elasticsearch[:filename] and node.elasticsearch[:download_url] attributes, if present, are respected and given preference upon node convergence, so that users still have the capability to override these attributes and thus configure downloads from a custom repository.