chef-handler-users 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "chef-handler-users"
6
- gem.version = "0.0.7"
6
+ gem.version = "0.0.8"
7
7
  gem.authors = ["Heavy Water Operations, LLC. (OR)"]
8
8
  gem.email = ["ops@hw-ops.com"]
9
9
  gem.homepage = "http://github.com/heavywater/chef-handler-users"
@@ -31,15 +31,17 @@ class Chef::Handler::Users < Chef::Handler
31
31
  end
32
32
 
33
33
  def report
34
- updated_users = run_status.updated_resources.find do |resource|
34
+ updated_users = run_status.updated_resources.find_all do |resource|
35
35
  resource.resource_name == "user"
36
36
  end
37
37
 
38
- return if updated_users.nil? || updated_users.empty?
38
+ return if updated_users.nil?
39
39
 
40
40
  subject = "Chef run on #{node.name} at #{Time.now.asctime} resulted in change of #{updated_users.length} users"
41
41
  message = generate_email_body(updated_users)
42
42
 
43
+ Chef::Log.info "Users handler detected #{updated_users.length} changes, sending summary email to #{@config[:to_address]}"
44
+
43
45
  Pony.mail(:to => @config[:to_address],
44
46
  :from => @config[:from_address],
45
47
  :subject => subject,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-users
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: