Merge branch '2014.7' of https://github.com/saltstack/salt into develop

This commit is contained in:
Mike Place 2014-10-29 11:25:48 -06:00
commit bebf14ed31
3 changed files with 11 additions and 5 deletions

View File

@ -44,7 +44,9 @@ LIBCLOUD_FUNCS_NOT_SUPPORTED = (
'saltify.avail_sizes',
'saltify.avail_images',
'saltify.avail_locations',
'rackspace.reboot'
'rackspace.reboot',
'openstack.list_locations',
'rackspace.list_locations'
)

View File

@ -629,7 +629,7 @@ def show_lowstate(queue=False, **kwargs):
def sls_id(
id_,
mods,
saltenv,
saltenv='base',
test=None,
queue=False,
**kwargs):

View File

@ -35,6 +35,7 @@ def __virtual__():
def add(name,
password=None,
# Disable pylint checking on the next options. They exist to match the
# user modules of other distributions.
# pylint: disable=W0613
@ -61,7 +62,10 @@ def add(name,
salt '*' user.add name password
'''
ret = __salt__['cmd.run_all']('net user {0} /add'.format(name))
if password:
ret = __salt__['cmd.run_all']('net user {0} {1} /add /y'.format(name, password))
else:
ret = __salt__['cmd.run_all']('net user {0} /add'.format(name))
if groups:
chgroups(name, groups)
if fullname:
@ -320,10 +324,10 @@ def _get_userprofile_from_registry(user, sid):
we can get it from the registry
'''
profile_dir = __salt__['reg.read_key'](
'HKEY_LOCAL_MACHINE', 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
'HKEY_LOCAL_MACHINE', u'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
'ProfileImagePath'
)
log.debug('user {0} with sid={2} profile is located at "{1}"'.format(user, profile_dir, sid))
log.debug(u'user {0} with sid={2} profile is located at "{1}"'.format(user, profile_dir, sid))
return profile_dir