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:
parent
bba680671b
commit
269558876e
@ -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})'])
|
||||
|
Loading…
Reference in New Issue
Block a user