Sha256: 02ecbf531498b148da707c24a7c59d78908302f20ce246f3da5bff8ad81ef98b
Contents?: true
Size: 1.21 KB
Versions: 37
Compression:
Stored size: 1.21 KB
Contents
# Cookbook Name:: mu-master # Provider:: mu_user # # Copyright:: Copyright (c) 2017 eGlobalTech, Inc., all rights reserved # # Licensed under the BSD-3 license (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License in the root of the project or at # # http://egt-labs.com/mu/LICENSE.html # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'mu' action :add do allusers = MU::Master.listUsers password = nil if !allusers.has_key?(new_resource.username) password = new_resource.password || MU.generateWindowsPassword end new_resource.admin ||= false ::MU::Master.manageUser( new_resource.username, name: new_resource.realname, password: password, email: new_resource.email, admin: new_resource.admin, orgs: new_resource.orgs, remove_orgs: new_resource.remove_orgs ) end action :delete do ::MU::Master.deleteUser(new_resource.username) end
Version data entries
37 entries across 37 versions & 1 rubygems