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

Do not log login_password params to DB module

This commit is contained in:
Michael DeHaan 2012-07-30 21:21:30 -04:00
parent d0f6410326
commit 8e60ad986a

View file

@ -130,6 +130,7 @@ class AnsibleModule(object):
syslog.openlog('ansible-%s' % os.path.basename(__file__))
# Sanitize possible password argument when logging
log_args = re.sub(r'password=.+ (.*)', r"password=NOT_LOGGING_PASSWORD \1", self.args)
log_args = re.sub(r'login_password=.+ (.*)', r"login_password=NOT_LOGGING_PASSWORD \1", log_args)
syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % log_args)
def boolean(self, arg):