We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Those codes are evaluated before wrap cookbooks, so we can't change those attributes by overwrite node['rabbitmq']['version'].
node['rabbitmq']['version']
default['rabbitmq']['deb_package'] = "rabbitmq-server_#{node['rabbitmq']['version']}-1_all.deb" default['rabbitmq']['deb_package_url'] = "https://www.rabbitmq.com/releases/rabbitmq-server/v#{node['rabbitmq']['version']}/" case node['platform_family'] when 'rhel', 'fedora' default['rabbitmq']['rpm_package'] = if node['platform_version'].to_i > 6 "rabbitmq-server-#{node['rabbitmq']['version']}-1.el7.noarch.rpm" else "rabbitmq-server-#{node['rabbitmq']['version']}-1.el6.noarch.rpm" end when 'suse' default['rabbitmq']['rpm_package'] = "rabbitmq-server-#{node['rabbitmq']['version']}-1.suse.noarch.rpm" end default['rabbitmq']['rpm_package_url'] = "https://www.rabbitmq.com/releases/rabbitmq-server/v#{node['rabbitmq']['version']}/"
Per suggestion from @yardinicwaller:
Do URL string interpolation in a recipe, while still allowing that to be overridden by an attribute if defined. It would look something like this:
attributes/default.rb:
attributes/default.rb
default['rabbitmq']['version'] = '3.6.12' default['rabbitmq']['deb_package'] = nil # override me if you have a local mirror
recipes/default.rb:
recipes/default.rb
default_deb_package = "https://[base URL]/v#{node['rabbitmq']['version']}/" deb_package = node['rabbitmq']['deb_package'] || default_deb_package remote_file "#{Chef::Config[:file_cache_path]}/#{deb_package}" do source deb_package
The text was updated successfully, but these errors were encountered:
@Wing924 feel free to look into a pull request that would make the change.
Sorry, something went wrong.
fix rabbitmq#457
efad8ef
No branches or pull requests
Those codes are evaluated before wrap cookbooks, so we can't change those attributes by overwrite
node['rabbitmq']['version']
.Solutions:
Per suggestion from @yardinicwaller:
Do URL string interpolation in a recipe, while still allowing that to be overridden by an attribute if defined. It would look something like this:
attributes/default.rb
:recipes/default.rb
:The text was updated successfully, but these errors were encountered: