lrc_handler 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.md +1 -0
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/lib/lbn_report_chef/lrc_uploader.rb +6 -3
- data/lib/lbn_report_chef/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 737fa2ad6b5b97e3cd79363e0e7429b575b37e78
|
4
|
+
data.tar.gz: ddeaf8c06ae83ec8313d2292b002942034e0ab2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb97900a9be6dd451700827e9abe744bbd8631ccf497d8562b3fdd10a7c7a4c5fe2d0df0e3e688fef13a4dc7e1e985445dbde3d669072dbb19398a177129b821
|
7
|
+
data.tar.gz: 7ef8f62349e2974de5b079636d7cc48098d5cf196fc787b6e923219a71b41de49602cd0baa065b8debe0c1ba2225137d9e6f6b3ba8ae6c0005fbd9361b7ff985
|
data/CHANGELOG.md
CHANGED
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Since it's released as a gem you can simply run this command under root
|
|
11
11
|
chef gem install lrc_handler
|
12
12
|
```
|
13
13
|
|
14
|
-
## Usage
|
14
|
+
## Usage
|
15
15
|
|
16
16
|
In /etc/chef/client.rb:
|
17
17
|
|
@@ -19,7 +19,7 @@ In /etc/chef/client.rb:
|
|
19
19
|
# this adds new functions to chef configuration
|
20
20
|
require 'lrc_handler'
|
21
21
|
# here you can specify your connection options
|
22
|
-
lrc_server_options :url => '
|
22
|
+
lrc_server_options :url => 'https://lrc.lbn.fr'
|
23
23
|
# add following line if you want to upload reports
|
24
24
|
lrc_reports_upload true
|
25
25
|
# add following line to manage reports verbosity. Allowed values are debug, notice and error
|
data/Rakefile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -12,12 +12,15 @@ module ChefHandlerLrc
|
|
12
12
|
def lrc_request(path, body, method = 'post')
|
13
13
|
uri = URI.parse(options[:url])
|
14
14
|
http = Net::HTTP.new(uri.host, uri.port)
|
15
|
+
http.use_ssl = true
|
16
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
15
17
|
req = Net::HTTP.const_get(method.capitalize).new("#{uri}#{path}")
|
16
|
-
req.add_field('Accept',
|
17
|
-
req.add_field('Content-Type',
|
18
|
+
req.add_field('Accept','application/json')
|
19
|
+
req.add_field('Content-Type','application/json')
|
18
20
|
req.body = body.to_json
|
19
21
|
response = http.request(req)
|
20
|
-
Chef::Log.info("The report API has return: #{response}")
|
22
|
+
Chef::Log.info("The report API has return: #{response.inspect} from #{uri}#{path}")
|
23
|
+
Chef::Log.debug("Report Content: #{body.to_json}")
|
21
24
|
end
|
22
25
|
end
|
23
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lrc_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- team-chef
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|