Merge pull request #29937 from multani/fix/states.boto_iam-group-users

Fix states.boto_iam group users
This commit is contained in:
Mike Place 2015-12-22 10:33:02 -07:00
commit be95d4d79a
2 changed files with 3 additions and 3 deletions

View File

@ -476,8 +476,8 @@ def remove_user_from_group(group_name, user_name, region=None, key=None, keyid=N
msg = 'Username : {0} does not exist.'
log.error(msg.format(user_name, group_name))
return False
if not user_exists_in_group(user_name, group_name, region=None, key=None, keyid=None,
profile=None):
if not user_exists_in_group(user_name, group_name, region=region, key=key,
keyid=keyid, profile=profile):
return True
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:

View File

@ -587,7 +587,7 @@ def group_present(name, policies=None, policies_from_pillars=None, users=None, r
if not _ret['result']:
ret['result'] = _ret['result']
return ret
if users:
if users is not None:
log.debug('Users are : {0}.'.format(users))
group_result = __salt__['boto_iam.get_group'](group_name=name, region=region, key=key, keyid=keyid, profile=profile)
ret = _case_group(ret, users, name, group_result, region, key, keyid, profile)