diff --git a/metadata.rb b/metadata.rb index c8a5618f..5d64ad54 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ license 'Apache v2.0' description 'Installs/Configures sumologic-collector' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.0.1' +version '2.0.2' attribute 'sumologic/credentials/bag_name', display_name: "Credentials bag name", type: "string", diff --git a/recipes/debian.rb b/recipes/debian.rb index 7917b74b..8cc9ea71 100644 --- a/recipes/debian.rb +++ b/recipes/debian.rb @@ -1,10 +1,13 @@ -remote_file "#{Chef::Config[:file_cache_path]}/sumocollector.deb" do - source node['sumologic']['collectorDEBUrl'] -end -dpkg_package 'sumocollector' do - source "#{Chef::Config[:file_cache_path]}/sumocollector.deb" - action :install +unless ::File.exists?(node['sumologic']['installDir']) + remote_file "#{Chef::Config[:file_cache_path]}/sumocollector.deb" do + source node['sumologic']['collectorDEBUrl'] + end + + dpkg_package 'sumocollector' do + source "#{Chef::Config[:file_cache_path]}/sumocollector.deb" + action :install + end end service 'collector' do