Skip to content

Commit

Permalink
Switch to notify for archive_file action
Browse files Browse the repository at this point in the history
We should extract only when we download new files, not everytime.

from review: @majormoses
  • Loading branch information
webframp committed Oct 28, 2020
1 parent 5dcefb1 commit da58b7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/ctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@
powershell_script 'Download Sensuctl' do
code "Invoke-WebRequest https://s3-us-west-2.amazonaws.com/sensu.io/sensu-go/#{node['sensu-go']['ctl_version']}/sensu-go_#{node['sensu-go']['ctl_version']}_windows_amd64.tar.gz -OutFile c:/sensutemp/sensu-go_#{node['sensu-go']['ctl_version']}_windows_amd64.tar.gz"
not_if "Test-Path c:/sensutemp/sensu-go_#{node['sensu-go']['ctl_version']}_windows_amd64.tar.gz"
notifies :extract, 'archive_file[Extract Sensuctl]'
end

archive_file 'Extract Sensuctl' do
path "c:/sensutemp/sensu-go_#{node['sensu-go']['ctl_version']}_windows_amd64.tar.gz"
destination sensuctl_bin
overwrite true
action :nothing
end

windows_path sensuctl_bin
Expand Down

0 comments on commit da58b7f

Please sign in to comment.