diff options
author | Tim Smith <tsmith@chef.io> | 2019-02-08 16:41:08 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2019-02-19 10:06:11 -0800 |
commit | 6fad9e8d084610b30dc29e760b6e56c25a850a84 (patch) | |
tree | 30da37399a042bbe0cde5ad11dd004113598d831 | |
parent | 994b3411c72ebe0639c16f0920a46dfcf259d593 (diff) | |
download | chef-6fad9e8d084610b30dc29e760b6e56c25a850a84.tar.gz |
Add another description and simplify the windows check
More cleanup
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/provider/user/windows.rb | 6 | ||||
-rw-r--r-- | 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 (<dougm@vmware.com>) -# 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 (<adam@chef.io>) -# 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 |