1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove logged chap secret (#53287)

This commit is contained in:
ndswartz 2019-04-10 11:12:42 -05:00 committed by ansibot
parent de14cd7ae8
commit eee51486fd

View file

@ -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',