chef-handler-motd 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/chef-handler-motd.gemspec +1 -1
- data/lib/chef-handler-motd.rb +2 -2
- metadata +2 -3
- data/chef-handler-motd-0.1.0.gem +0 -0
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# ChefMOTD handler
|
2
2
|
Update your MOTD after a Chef run with various data
|
3
3
|
|
4
|
+
# Prerequisites
|
5
|
+
Mostly, just having MOTD configured. We use Estately's [motd](https://github.com/estately/cookbooks/tree/master/motd) cookbook
|
6
|
+
|
4
7
|
# Usage
|
5
8
|
Either just pull the handler file into a files directory of one of your
|
6
9
|
cookbooks, or download as a Rubygem and source it that way.
|
data/chef-handler-motd.gemspec
CHANGED
data/lib/chef-handler-motd.rb
CHANGED
@@ -33,7 +33,7 @@ class ChefMOTD < Chef::Handler
|
|
33
33
|
def report
|
34
34
|
msg = <<-eos
|
35
35
|
#!/bin/sh
|
36
|
-
echo \"Node #{node.name} last success
|
36
|
+
echo \"Node #{node.name} last success at #{Time.now.to_s} in #{run_status.elapsed_time} seconds\"
|
37
37
|
echo \"Updated resources on last run (total: #{run_status.updated_resources.length}):\"
|
38
38
|
eos
|
39
39
|
run_status.updated_resources.each do |res|
|
@@ -42,7 +42,7 @@ echo \"Updated resources on last run (total: #{run_status.updated_resources.leng
|
|
42
42
|
if run_status.success?
|
43
43
|
Chef::Log.info 'Updating Chef info in MOTD ...'
|
44
44
|
file = "/etc/update-motd.d/#{@priority}-chef-motd"
|
45
|
-
|
45
|
+
::File.open(file, 'w') {|f| f.puts msg}
|
46
46
|
::File.chmod(0755, file)
|
47
47
|
end
|
48
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-handler-motd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Edits MOTD at the end of a Chef run
|
15
15
|
email: ops@simple.com
|
@@ -17,7 +17,6 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- chef-handler-motd-0.1.0.gem
|
21
20
|
- chef-handler-motd.gemspec
|
22
21
|
- lib/chef-handler-motd.rb
|
23
22
|
- LICENSE
|
data/chef-handler-motd-0.1.0.gem
DELETED
Binary file
|