DeleteUser: do not disable user if already disabled (#64797)

* DeleteUser: do not disable user if already disabled

* add changelog fragment
pull/65132/head
Bill Dodd 5 years ago committed by John R Barker
parent b36f572256
commit f51f87a986

@ -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…
Cancel
Save