Remove logged chap secret (#53287)

pull/55101/head
ndswartz 5 years ago committed by ansibot
parent de14cd7ae8
commit eee51486fd

@ -157,7 +157,7 @@ class IscsiTarget(object):
if not self.url.endswith('/'):
self.url += '/'
self._logger.info(self.chap_secret)
if self.chap_secret is not None:
if len(self.chap_secret) < 12 or len(self.chap_secret) > 16:
self.module.fail_json(msg="The provided CHAP secret is not valid, it must be between 12 and 16"
@ -235,8 +235,6 @@ class IscsiTarget(object):
update = True
body.update(dict(enableChapAuthentication=False))
self._logger.info(pformat(body))
if update and not self.check_mode:
try:
request(self.url + 'storage-systems/%s/iscsi/target-settings' % self.ssid, method='POST',

Loading…
Cancel
Save