From 6fad9e8d084610b30dc29e760b6e56c25a850a84 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 8 Feb 2019 16:41:08 -0800 Subject: Add another description and simplify the windows check More cleanup Signed-off-by: Tim Smith --- lib/chef/provider/user/windows.rb | 6 ++---- lib/chef/resource/user.rb | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/chef/provider/user/windows.rb b/lib/chef/provider/user/windows.rb index f393b81919..6cb9cbdb19 100644 --- a/lib/chef/provider/user/windows.rb +++ b/lib/chef/provider/user/windows.rb @@ -1,6 +1,6 @@ # # Author:: Doug MacEachern () -# Copyright:: Copyright 2010-2016, VMware, Inc. +# Copyright:: Copyright 2010-2019, VMware, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,9 +18,7 @@ require "chef/provider/user" require "chef/exceptions" -if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require "chef/util/windows/net_user" -end +require "chef/util/windows/net_user" if Chef::Platform.windows? class Chef class Provider diff --git a/lib/chef/resource/user.rb b/lib/chef/resource/user.rb index a188b13d2c..2186a77f79 100644 --- a/lib/chef/resource/user.rb +++ b/lib/chef/resource/user.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob () -# Copyright:: Copyright 2008-2017, Chef Software Inc. +# Copyright:: Copyright 2008-2019, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,10 +20,11 @@ require "chef/resource" class Chef class Resource - # Use the user resource to add users, update existing users, remove users, and to lock/unlock user passwords. class User < Chef::Resource resource_name :user_resource_abstract_base_class # this prevents magickal class name DSL wiring + description "Use the user resource to add users, update existing users, remove users, and to lock/unlock user passwords." + default_action :create allowed_actions :create, :remove, :modify, :manage, :lock, :unlock -- cgit v1.2.1