DeleteUser: do not disable user if already disabled (#64797)
* DeleteUser: do not disable user if already disabled * add changelog fragment
This commit is contained in:
parent
b36f572256
commit
f51f87a986
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- redfish_command - fix error when deleting a disabled Redfish account (https://github.com/ansible/ansible/issues/64684)
|
|
@ -991,7 +991,7 @@ class RedfishUtils(object):
|
|||
return {'ret': True, 'changed': False}
|
||||
|
||||
payload = {'UserName': ''}
|
||||
if 'Enabled' in data:
|
||||
if data.get('Enabled', False):
|
||||
payload['Enabled'] = False
|
||||
response = self.patch_request(self.root_uri + uri, payload)
|
||||
if response['ret'] is False:
|
||||
|
|
Loading…
Reference in a new issue