1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

only use a basic auth password for external logging if username is set

This commit is contained in:
Ryan Petrello 2020-04-08 20:11:07 -04:00 committed by Christian Adams
parent bba680671b
commit 269558876e

View File

@ -58,7 +58,8 @@ def construct_rsyslog_conf_template(settings=settings):
password = getattr(settings, 'LOG_AGGREGATOR_PASSWORD', '')
if username:
params.append(f'uid="{username}"')
if password:
if username and password:
# you can only have a basic auth password if there's a username
params.append(f'pwd="{password}"')
params = ' '.join(params)
parts.extend(['module(load="omhttp")', f'action({params})'])