Skip to content

Commit

Permalink
Merge pull request #9711 from Mab879/fix_rsyslog_tls
Browse files Browse the repository at this point in the history
Fix rsyslog_remote_tls Remediations
  • Loading branch information
jan-cerny committed Oct 20, 2022
2 parents 0816c7f + 85659bd commit 22ce78e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{{ ansible_instantiate_variables("rsyslog_remote_loghost_address") }}}

- name: "Get omfwd configuration directive"
shell: sed -e '/action\s*(\s*type\s*=\s*"omfwd"/,/)/!d' /etc/rsyslog.conf /etc/rsyslog.d/*.conf
shell: sed -e '/^action\s*(\s*type\s*=\s*"omfwd"/,/)/!d' /etc/rsyslog.conf /etc/rsyslog.d/*.conf || true
register: include_omfwd_config_output

- name: "Get include files directives"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{{ bash_instantiate_variables("rsyslog_remote_loghost_address") }}}

# Get omfwd configuration directive
OMFWD_CONFIG_OUTPUT=`grep -Pzo '(?s)action\s*\(\s*type\s*=\s*"omfwd".*\)' /etc/rsyslog.conf /etc/rsyslog.d/*.conf`
OMFWD_CONFIG_OUTPUT=`grep -Pzo '^(?s)action\s*\(\s*type\s*=\s*"omfwd".*\)' /etc/rsyslog.conf /etc/rsyslog.d/*.conf`
OMFWD_CONFIG=`echo "$OMFWD_CONFIG_OUTPUT"| awk 'BEGIN {FS=":"; RS=")\n"}; {print $2}'`
OMFWD_CONFIG_FILE=`echo "$OMFWD_CONFIG_OUTPUT"| awk 'BEGIN {FS=":"; RS=")\n"}; {print $1}'`
if ! [ -z "$OMFWD_CONFIG" ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/bash

touch /etc/rsyslog.conf

0 comments on commit 22ce78e

Please sign in to comment.