diff --git a/roles/base/files/rsyslog/rsyslog.conf.log01.iad2.fedoraproject.org b/roles/base/files/rsyslog/rsyslog.conf.log01.iad2.fedoraproject.org index 0da3754b78..7784bdcad7 100644 --- a/roles/base/files/rsyslog/rsyslog.conf.log01.iad2.fedoraproject.org +++ b/roles/base/files/rsyslog/rsyslog.conf.log01.iad2.fedoraproject.org @@ -35,7 +35,7 @@ $EscapeControlCharactersOnReceive off $UDPServerRun 514 $InputTCPMaxSessions 2000 $InputTCPServerRun 514 -$InputTCPServerRun 5000 +$InputTCPServerRun 5000 $IMUXSockRateLimitInterval 0 $SystemLogRateLimitInterval 0 $WorkDirectory /var/lib/rsyslog @@ -213,3 +213,10 @@ local4.* ?m_http_apps;MergeFormat # this is only for the merged logs from auditd :msg, !contains, "type=AVC" ~ local6.* ?m_audit;MergeFormat + +# forward to splunk host, over tls +*.* @splunk-syslog.corp.redhat.com:514 +$DefaultNetstreamDriver gtls # use gtls netstream driver +$ActionSendStreamDriverMode 1 # require TLS for the connection +$ActionSendStreamDriverAuthMode anon # server is NOT authenticated +$DefaultNetstreamDriverCAFile {{private}}/files/splunk-certs/2022-IT-Root-CA.pem diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 418a296ee2..602a1a5c5d 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -230,6 +230,16 @@ notify: - flush journald tmpfiles to persistent store +- name: ensure packages required for rsyslog are installed + package: name={{ item }} state=present + with_items: + - rsyslog-gnutls + tags: + - rsyslogd + - config + - base + when: inventory_hostname.startswith('log01') + - name: rsyslog.conf copy: src={{ item }} dest=/etc/rsyslog.conf mode=0644 with_first_found: @@ -464,7 +474,7 @@ # rhel8 hosts do not have /usr/bin/python, but there are a few things we call # with that because they also run the same on python2 hosts. # So, we set python3 to /usr/bin/python on those hosts: -- name : ensure that platform-python is installed on EL8 boxes +- name: ensure that platform-python is installed on EL8 boxes package: name={{ item }} state=present with_items: - platform-python