From 1b52f65c91807dad355e23c2d732761d88b9bcf0 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 6 Dec 2020 12:03:24 +0900 Subject: [PATCH 1/2] Because of the download URL change, modify attiributes. --- cookbooks/vector/attributes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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' }, }) From bd1571e11c0f53dc0935483c8b5a49cc05cc3951 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 6 Dec 2020 12:03:42 +0900 Subject: [PATCH 2/2] Because of the download URL change, modify the formula to generate URL. --- cookbooks/vector/install.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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