diff options
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 |