smart_proxy_openscap 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66166081c04c172ed14641a8d6a91297b62e282e
4
- data.tar.gz: 90f5415c44875a56d909ecd1fa6a643a4e7641af
3
+ metadata.gz: a3045f38873e1f2bcde54bde9421175602bb9f34
4
+ data.tar.gz: 24414ceac6a0c7d5a3462d2de1ab11e6a45f5806
5
5
  SHA512:
6
- metadata.gz: 5fb6cb5c0749fc59afb091bf8b1febf908fb77234c6b99bbaeaf5acdbc1aa4b410df63b641b49c461aa61cb381675ec0d3aa55ac0e274bac1d9b78fa84e11627
7
- data.tar.gz: 2f2ee200b535c56397fbfee9bbc73ac5391f7879f2a2b2e36640acc3ca8b47a892a1e2aec1bb1cf7f4ff0c377a9b06c40a9bcaa7eb19cc89a2dffebf805eea50
6
+ metadata.gz: d1cceeb3e1ed7a8e469fafef6f703a89db4352d22d6f765dd6455fea2ed097addd0bee56c08495b210b78039d2960e715e0c08d547c95c3cf6584dca7072db90
7
+ data.tar.gz: 498837268ecc6d1c12bdf4906fda81ade22b1846358acc84a5813dd7e3242d5086805cda2b637b417cee04d47fcc48fbcbb6344499dcfca31dd954d102fa1a38
@@ -38,7 +38,7 @@ end
38
38
  begin
39
39
  Proxy::OpenSCAP::send_spool_to_foreman
40
40
  rescue StandardError => e
41
- logger.debug e.backtrace.join("\n\t")
42
- logger.error "Failed to send SCAP results to the Foreman server: #{e}"
41
+ logger.error "#{e}
42
+ puts "#{e} See #{Proxy::OpenSCAP.fullpath(Proxy::OpenSCAP::Plugin.settings.openscap_send_log_file)}"
43
43
  exit false
44
44
  end
@@ -1,2 +1,2 @@
1
1
  # Send all collected OpenSCAP reports once every 30 minutes
2
- */30 * * * * foreman-proxy smart-proxy-openscap-send >>/var/log/foreman-proxy/cron.log 2>&1
2
+ */30 * * * * foreman-proxy smart-proxy-openscap-send >> /var/log/foreman-proxy/cron.log
@@ -10,6 +10,6 @@
10
10
 
11
11
  module Proxy
12
12
  module OpenSCAP
13
- VERSION = '0.5.1'
13
+ VERSION = '0.5.3'
14
14
  end
15
15
  end
@@ -3,11 +3,19 @@ module Proxy::OpenSCAP
3
3
  include ::Proxy::Log
4
4
 
5
5
  def post_arf_from_spool(arf_dir)
6
+ failed = nil
6
7
  Dir.foreach(arf_dir) do |cname|
7
- next if cname == '.' || cname == '..'
8
- cname_dir = File.join(arf_dir, cname)
9
- forward_cname_dir(cname, cname_dir) if File.directory?(cname_dir)
8
+ begin
9
+ next if cname == '.' || cname == '..'
10
+ cname_dir = File.join(arf_dir, cname)
11
+ forward_cname_dir(cname, cname_dir) if File.directory?(cname_dir)
12
+ rescue StandardError => e
13
+ logger.debug e.backtrace.join("\n\t")
14
+ logger.error "Failed to send SCAP results for #{cname} to the Foreman server: #{e}"
15
+ failed = true
16
+ end
10
17
  end
18
+ raise "Failed to send SCAP results for one or more hosts." if failed
11
19
  end
12
20
 
13
21
  private
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
- - "Šimon Lukašík"
7
+ - Šimon Lukašík
8
8
  - Shlomi Zadok
9
9
  - Marek Hulan
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-09 00:00:00.000000000 Z
13
+ date: 2016-01-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake