knife-lastrun 0.0.5 → 0.0.7
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 +7 -0
- data/knife-lastrun.gemspec +1 -1
- data/lib/knife-lastrun/version.rb +1 -1
- data/lib/lastrun_update.rb +12 -12
- metadata +8 -10
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 1d97250deff8ffd5c72037b4d0238fed378c56b8
|
|
4
|
+
data.tar.gz: 8e8c8970a1404fec261e69b6bd24526d785f0c4e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 436d4e068161db2aadfcb606a4760bc23a223ed653512cd2b902a4a7b06ce8103b570d0b65afb3536f0349463a805a91829632bbb11e1e51c2a84654f6216c24
|
|
7
|
+
data.tar.gz: 34389aa362ea2970d6dec370a1b9bc47a26c384783fef524a6bedd60274331bdb704361f7e2f8b1709c0368dacba2dd102da83a642c1e9f310cb6e3d71c06ade
|
data/knife-lastrun.gemspec
CHANGED
|
@@ -5,7 +5,7 @@ require "knife-lastrun/version"
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'knife-lastrun'
|
|
7
7
|
s.version = Knife::NodeLastrun::VERSION
|
|
8
|
-
s.date = '
|
|
8
|
+
s.date = '2017-07-05'
|
|
9
9
|
s.summary = "A plugin for Chef::Knife which displays node metadata about the last chef run."
|
|
10
10
|
s.description = s.summary
|
|
11
11
|
s.authors = ["John Goulah"]
|
data/lib/lastrun_update.rb
CHANGED
|
@@ -4,26 +4,26 @@ class LastRunUpdateHandler < Chef::Handler
|
|
|
4
4
|
|
|
5
5
|
def report
|
|
6
6
|
_node = Chef::Node.load(node.name)
|
|
7
|
-
_node.
|
|
7
|
+
_node.override[:lastrun] = {}
|
|
8
8
|
|
|
9
|
-
_node.
|
|
9
|
+
_node.override[:lastrun][:status] = run_status.success? ? "success" : "failed"
|
|
10
10
|
|
|
11
|
-
_node.
|
|
12
|
-
_node.
|
|
13
|
-
_node.
|
|
14
|
-
_node.
|
|
11
|
+
_node.override[:lastrun][:runtimes] = {}
|
|
12
|
+
_node.override[:lastrun][:runtimes][:elapsed] = run_status.elapsed_time
|
|
13
|
+
_node.override[:lastrun][:runtimes][:start] = run_status.start_time
|
|
14
|
+
_node.override[:lastrun][:runtimes][:end] = run_status.end_time
|
|
15
15
|
|
|
16
|
-
_node.
|
|
17
|
-
_node.
|
|
18
|
-
_node.
|
|
19
|
-
_node.
|
|
16
|
+
_node.override[:lastrun][:debug] = {}
|
|
17
|
+
_node.override[:lastrun][:debug][:backtrace] = run_status.backtrace
|
|
18
|
+
_node.override[:lastrun][:debug][:exception] = run_status.exception
|
|
19
|
+
_node.override[:lastrun][:debug][:formatted_exception] = run_status.formatted_exception
|
|
20
20
|
|
|
21
|
-
_node.
|
|
21
|
+
_node.override[:lastrun][:updated_resources] = []
|
|
22
22
|
Array(run_status.updated_resources).each do |resource|
|
|
23
23
|
m = "recipe[#{resource.cookbook_name}::#{resource.recipe_name}] ran '#{resource.action}' on #{resource.resource_name} '#{resource.name}'"
|
|
24
24
|
Chef::Log.debug(m)
|
|
25
25
|
|
|
26
|
-
_node.
|
|
26
|
+
_node.override[:lastrun][:updated_resources].insert(0, {
|
|
27
27
|
:cookbook_name => resource.cookbook_name,
|
|
28
28
|
:recipe_name => resource.recipe_name,
|
|
29
29
|
:action => resource.action,
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-lastrun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 0.0.7
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- John Goulah
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2017-07-05 00:00:00.000000000 Z
|
|
13
12
|
dependencies: []
|
|
14
13
|
description: A plugin for Chef::Knife which displays node metadata about the last
|
|
15
14
|
chef run.
|
|
@@ -19,7 +18,7 @@ executables: []
|
|
|
19
18
|
extensions: []
|
|
20
19
|
extra_rdoc_files: []
|
|
21
20
|
files:
|
|
22
|
-
- .gitignore
|
|
21
|
+
- ".gitignore"
|
|
23
22
|
- README.md
|
|
24
23
|
- knife-lastrun.gemspec
|
|
25
24
|
- lib/chef/knife/lastrun.rb
|
|
@@ -27,27 +26,26 @@ files:
|
|
|
27
26
|
- lib/lastrun_update.rb
|
|
28
27
|
homepage: https://github.com/jgoulah/knife-lastrun
|
|
29
28
|
licenses: []
|
|
29
|
+
metadata: {}
|
|
30
30
|
post_install_message:
|
|
31
31
|
rdoc_options: []
|
|
32
32
|
require_paths:
|
|
33
33
|
- lib
|
|
34
34
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
35
|
-
none: false
|
|
36
35
|
requirements:
|
|
37
|
-
- -
|
|
36
|
+
- - ">="
|
|
38
37
|
- !ruby/object:Gem::Version
|
|
39
38
|
version: '0'
|
|
40
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
40
|
requirements:
|
|
43
|
-
- -
|
|
41
|
+
- - ">="
|
|
44
42
|
- !ruby/object:Gem::Version
|
|
45
43
|
version: '0'
|
|
46
44
|
requirements: []
|
|
47
45
|
rubyforge_project:
|
|
48
|
-
rubygems_version:
|
|
46
|
+
rubygems_version: 2.6.8
|
|
49
47
|
signing_key:
|
|
50
|
-
specification_version:
|
|
48
|
+
specification_version: 4
|
|
51
49
|
summary: A plugin for Chef::Knife which displays node metadata about the last chef
|
|
52
50
|
run.
|
|
53
51
|
test_files: []
|