Skip to content

Instantly share code, notes, and snippets.

@fujin
Created February 10, 2009 22:15
Show Gist options
  • Save fujin/61627 to your computer and use it in GitHub Desktop.
Save fujin/61627 to your computer and use it in GitHub Desktop.
def compare_user
!![ :uid, :gid, :comment, :home, :shell, :password ].reject do |check_attrib|
@new_resource.send(check_attrib).nil?
end.find do |user_attrib|
Chef::Log.debug("#{@new_resource}: new: #{@new_resource.send(user_attrib)} current: #{@current_resource.send(user_attrib)}")
@new_resource.send(user_attrib) != @current_resource.send(user_attrib)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment