Modify the logic to decide the download URL.
This commit is contained in:
parent
971e1adf8e
commit
ba7d01f16d
|
@ -12,7 +12,7 @@ begin
|
|||
Timeout.timeout(3) do
|
||||
response = Net::HTTP.get_response(uri)
|
||||
|
||||
vtag = $1 if response.body =~ %r{tag\/(v\d+\.\d+\.\d+)}
|
||||
vtag = $1 if response['location'] =~ %r{tag\/(v\d+\.\d+\.\d+)}
|
||||
|
||||
filestat_exporter_bin = "#{node['filestat_exporter']['prefix']}#{vtag}#{node['filestat_exporter']['postfix']}"
|
||||
filestat_exporter_url = "#{node['filestat_exporter']['url']}/#{vtag}/#{filestat_exporter_bin}"
|
||||
|
|
|
@ -13,7 +13,7 @@ begin
|
|||
Timeout.timeout(3) do
|
||||
response = Net::HTTP.get_response(uri)
|
||||
|
||||
vtag = $1 if response.body =~ %r{tag\/(v\d+\.\d+\.\d+)}
|
||||
vtag = $1 if response['location'] =~ %r{tag\/(v\d+\.\d+\.\d+)}
|
||||
tag = vtag.sub(/^v/, '')
|
||||
|
||||
node_exporter_bin = "#{node['node_exporter']['prefix']}#{tag}#{node['node_exporter']['postfix']}"
|
||||
|
|
|
@ -13,7 +13,7 @@ begin
|
|||
Timeout.timeout(3) do
|
||||
response = Net::HTTP.get_response(uri)
|
||||
|
||||
vtag = $1 if response.body =~ %r{tag\/(v\d+\.\d+\.\d+)}
|
||||
vtag = $1 if response['location'] =~ %r{tag\/(v\d+\.\d+\.\d+)}
|
||||
tag = vtag.sub(/^v/, '')
|
||||
|
||||
promtail_url = "#{node['promtail']['url']}/#{vtag}/#{node['promtail']['bin']}"
|
||||
|
|
Loading…
Reference in New Issue