Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#521 from jlarriba/logging_tls
Browse files Browse the repository at this point in the history
Configure rsyslog to being able to send TLS encrypted logs to the rem…
  • Loading branch information
openshift-merge-bot[bot] authored Dec 21, 2023
2 parents ad41417 + 08f6713 commit 467848f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
9 changes: 5 additions & 4 deletions roles/edpm_telemetry/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@
owner: root
group: root
content: |
module(load="imjournal" PersistStateInterval="10"
StateFile="journal_state")
action(type="omfwd" target="172.17.0.80" port="10514" protocol="tcp"
action.resumeRetryCount="100"
queue.type="linkedList" queue.size="10000")
queue.type="linkedList" queue.size="10000"
StreamDriver="ossl"
StreamDriverMode="1"
StreamDriverAuthMode="x509/certvalid"
StreamDriver.CAFile="/etc/pki/rsyslog/ca-openshift.crt")
19 changes: 17 additions & 2 deletions roles/edpm_telemetry/tasks/enable_logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,30 @@
become: true
failed_when: false
register: rsyslog_service_state
tags:
- edpm_logging

- name: Configure rsyslog if present
become: true
when:
- (rsyslog_service_state is success) and
((rsyslog_service_state.status['SubState'] | lower) == 'running')
tags:
- edpm_logging
block:
- name: Install openssl module support for rsyslog
ansible.builtin.dnf:
name: rsyslog-openssl
state: present

- name: Copy Openshift CA to the node
become: true
ansible.builtin.copy:
src: "{{ edpm_telemetry_config_src }}/ca-openshift.crt"
dest: "/etc/pki/rsyslog/ca-openshift.crt"
mode: "0644"
remote_src: "{{ telemetry_test | default('false') }}"

- name: Deploy rsyslog configuration
become: true
ansible.builtin.copy:
Expand All @@ -35,5 +52,3 @@
mode: "0644"
remote_src: "{{ telemetry_test | default('false') }}"
notify: Restart rsyslog
tags:
- edpm_logging

0 comments on commit 467848f

Please sign in to comment.