Skip to content

Commit

Permalink
Rebase and fix name_map
Browse files Browse the repository at this point in the history
  • Loading branch information
ephracis committed Jun 6, 2019
1 parent 8c62b64 commit 0aac440
Show file tree
Hide file tree
Showing 10 changed files with 683 additions and 702 deletions.
8 changes: 3 additions & 5 deletions modules/foreman_user.py → plugins/modules/foreman_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,11 @@ def main():
if 'organizations' in entity_dict:
entity_dict['organizations'] = module.find_resources('organizations', entity_dict['organizations'], thin=True)

entity_dict = sanitize_entity_dict(entity_dict, name_map)

check_missing = None
if 'password' in entity_dict:
check_missing = ['password']
if 'user_password' in entity_dict:
check_missing = [name_map['user_password']]

changed = module.ensure_resource_state('users', entity_dict, entity, state, check_missing=check_missing)
changed = module.ensure_resource_state('users', entity_dict, entity, state, name_map, check_missing=check_missing)

module.exit_json(changed=changed, entity_dict=entity_dict)

Expand Down
Loading

0 comments on commit 0aac440

Please sign in to comment.