mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 11:10:03 -03:30
Allow unsigned certs in logging if cert verification is disabled.
This commit is contained in:
@@ -44,7 +44,7 @@ data_loggly = {
|
|||||||
'https',
|
'https',
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="logs-01.loggly.com" serverport="80" usehttps="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="inputs/1fd38090-2af1-4e1e-8d80-492899da0f71/tag/http/")', # noqa
|
'action(type="omhttp" server="logs-01.loggly.com" serverport="80" usehttps="off" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="inputs/1fd38090-2af1-4e1e-8d80-492899da0f71/tag/http/")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -77,7 +77,7 @@ data_loggly = {
|
|||||||
None,
|
None,
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="yoursplunk" serverport="443" usehttps="on" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
'action(type="omhttp" server="yoursplunk" serverport="443" usehttps="on" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -88,7 +88,7 @@ data_loggly = {
|
|||||||
None,
|
None,
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="yoursplunk" serverport="80" usehttps="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
'action(type="omhttp" server="yoursplunk" serverport="80" usehttps="off" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -99,7 +99,7 @@ data_loggly = {
|
|||||||
None,
|
None,
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="yoursplunk" serverport="8088" usehttps="on" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
'action(type="omhttp" server="yoursplunk" serverport="8088" usehttps="on" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -110,7 +110,7 @@ data_loggly = {
|
|||||||
None,
|
None,
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="yoursplunk" serverport="8088" usehttps="on" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
'action(type="omhttp" server="yoursplunk" serverport="8088" usehttps="on" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -121,7 +121,7 @@ data_loggly = {
|
|||||||
'https',
|
'https',
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="yoursplunk.org" serverport="8088" usehttps="on" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
'action(type="omhttp" server="yoursplunk.org" serverport="8088" usehttps="on" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -132,7 +132,7 @@ data_loggly = {
|
|||||||
None,
|
None,
|
||||||
'\n'.join([
|
'\n'.join([
|
||||||
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
'template(name="awx" type="string" string="%rawmsg-after-pri%")\nmodule(load="omhttp")',
|
||||||
'action(type="omhttp" server="yoursplunk.org" serverport="8088" usehttps="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
'action(type="omhttp" server="yoursplunk.org" serverport="8088" usehttps="off" allowunsignedcerts="off" skipverifyhost="off" action.resumeRetryCount="-1" template="awx" errorfile="/var/log/tower/rsyslog.err" action.resumeInterval="5" restpath="services/collector/event")', # noqa
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ def construct_rsyslog_conf_template(settings=settings):
|
|||||||
# https://github.com/rsyslog/rsyslog-doc/blob/master/source/configuration/modules/omhttp.rst
|
# https://github.com/rsyslog/rsyslog-doc/blob/master/source/configuration/modules/omhttp.rst
|
||||||
ssl = 'on' if parsed.scheme == 'https' else 'off'
|
ssl = 'on' if parsed.scheme == 'https' else 'off'
|
||||||
skip_verify = 'off' if settings.LOG_AGGREGATOR_VERIFY_CERT else 'on'
|
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:
|
if not port:
|
||||||
port = 443 if parsed.scheme == 'https' else 80
|
port = 443 if parsed.scheme == 'https' else 80
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ def construct_rsyslog_conf_template(settings=settings):
|
|||||||
f'server="{host}"',
|
f'server="{host}"',
|
||||||
f'serverport="{port}"',
|
f'serverport="{port}"',
|
||||||
f'usehttps="{ssl}"',
|
f'usehttps="{ssl}"',
|
||||||
|
f'allowunsignedcerts="{allow_unsigned}"',
|
||||||
f'skipverifyhost="{skip_verify}"',
|
f'skipverifyhost="{skip_verify}"',
|
||||||
'action.resumeRetryCount="-1"',
|
'action.resumeRetryCount="-1"',
|
||||||
'template="awx"',
|
'template="awx"',
|
||||||
|
|||||||
Reference in New Issue
Block a user