diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-08 06:03:36 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-08 06:03:36 +0000 |
commit | 0925fb0cd9b7d370a57247b00f402d33f6f0d78b (patch) | |
tree | 7687cce7d2c104be7acc6ec496690916b38445a0 /lib | |
parent | 333842bd860aee58cb8e7712c9e24f812b53107e (diff) | |
download | puppet-0925fb0cd9b7d370a57247b00f402d33f6f0d78b.tar.gz puppet-0925fb0cd9b7d370a57247b00f402d33f6f0d78b.tar.xz puppet-0925fb0cd9b7d370a57247b00f402d33f6f0d78b.zip |
Adding some more testing on the @should values for :groups on users, and fixing a bug that often made :groups think it was out of sync.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2267 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/transaction.rb | 5 | ||||
-rwxr-xr-x | lib/puppet/type/user.rb | 25 |
2 files changed, 3 insertions, 27 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index 182534de7..fed2348a9 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -69,11 +69,8 @@ class Transaction # And then return return [] end - changes = [changes] unless changes.is_a?(Array) - unless changes.is_a? Array - changes = [changes] - end + changes = [changes] unless changes.is_a?(Array) if changes.length > 0 @resourcemetrics[:out_of_sync] += 1 diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index fa0344931..ae62e577d 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -6,27 +6,6 @@ module Puppet newtype(:user) do newproperty(:ensure) do newvalue(:present, :event => :user_created) do - # Verify that they have provided everything necessary, if we - # are trying to manage the user -# if @parent.managed? -# @parent.class.properties.each { |property| -# next if propertyobj = @parent.property(property.name) -# next if property.name == :ensure -# -# unless property.autogen? or property.isoptional? -# if property.method_defined?(:autogen) -# @parent[property.name] = :auto -# else -# @parent.fail "Users require a value for %s" % -# property.name -# end -# end -# } -# -# #if @properties.empty? -# # @parent[:comment] = @parent[:name] -# #end -# end provider.create end @@ -223,10 +202,10 @@ module Puppet def insync? unless defined? @should and @should - return false + return true end unless defined? @is and @is - return false + return true end tmp = @is if @is.is_a? Array |