mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
only use a basic auth password for external logging if username is set
This commit is contained in:
committed by
Christian Adams
parent
bba680671b
commit
269558876e
@@ -58,7 +58,8 @@ def construct_rsyslog_conf_template(settings=settings):
|
|||||||
password = getattr(settings, 'LOG_AGGREGATOR_PASSWORD', '')
|
password = getattr(settings, 'LOG_AGGREGATOR_PASSWORD', '')
|
||||||
if username:
|
if username:
|
||||||
params.append(f'uid="{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.append(f'pwd="{password}"')
|
||||||
params = ' '.join(params)
|
params = ' '.join(params)
|
||||||
parts.extend(['module(load="omhttp")', f'action({params})'])
|
parts.extend(['module(load="omhttp")', f'action({params})'])
|
||||||
|
|||||||
Reference in New Issue
Block a user