Allow unsigned certs in logging if cert verification is disabled.

This commit is contained in:
Bill Nottingham
2020-04-28 10:56:23 -04:00
parent 94692c2364
commit 5d24acf613
2 changed files with 9 additions and 7 deletions

View File

@@ -60,6 +60,7 @@ def construct_rsyslog_conf_template(settings=settings):
# https://github.com/rsyslog/rsyslog-doc/blob/master/source/configuration/modules/omhttp.rst
ssl = 'on' if parsed.scheme == 'https' else 'off'
skip_verify = 'off' if settings.LOG_AGGREGATOR_VERIFY_CERT else 'on'
allow_unsigned = 'off' if settings.LOG_AGGREGATOR_VERIFY_CERT else 'on'
if not port:
port = 443 if parsed.scheme == 'https' else 80
@@ -68,6 +69,7 @@ def construct_rsyslog_conf_template(settings=settings):
f'server="{host}"',
f'serverport="{port}"',
f'usehttps="{ssl}"',
f'allowunsignedcerts="{allow_unsigned}"',
f'skipverifyhost="{skip_verify}"',
'action.resumeRetryCount="-1"',
'template="awx"',