diff --git a/cookbooks/vector/attributes.rb b/cookbooks/vector/attributes.rb index 0c0ffe4..c41aaf0 100644 --- a/cookbooks/vector/attributes.rb +++ b/cookbooks/vector/attributes.rb @@ -18,6 +18,7 @@ node.reverse_merge!({ 'vector' => { 'url' => 'https://github.com/timberio/vector/releases/download/', 'ipaddr' => ipaddr, - 'deb' => 'vector-amd64.deb' + 'debPrefix' => 'vector-', + 'debPostfix' => '-amd64.deb' }, }) diff --git a/cookbooks/vector/install.rb b/cookbooks/vector/install.rb index 8a77217..3def346 100644 --- a/cookbooks/vector/install.rb +++ b/cookbooks/vector/install.rb @@ -16,7 +16,7 @@ begin vtag = $1 if response.body =~ %r{tag\/(v\d+\.\d+\.\d+)} tag = vtag.sub(/^v/, '') - vector_deb = "#{node['vector']['deb']}" + vector_deb = "#{node['vector']['debPrefix']}#{tag}#{node['vector']['debPostfix']}" vector_url = "#{node['vector']['url']}/#{vtag}/#{vector_deb}" end rescue