Skip to content

Commit ceb46b7

Browse files
committed
rsyslog_dir_file_modes options are not allowed in global()
1 parent 660bc9d commit ceb46b7

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1-
global({{ rsyslog_dir_file_modes }})
2-
31
$RuleSet {{ item.name }}
42
{% if item.name != "mgnt_sc" %}
53

64
{% for app, config in rsyslog_central_apps.items() %}
75
if $programname == "{{ config.program }}"
86
{%- if 'contains' in config %} and $msg contains '{{ config.contains }}' {% endif -%}
97
{%- if 'startswith' in config %} and $msg startswith '{{ config.startswith }}' {% endif %}
10-
then { action(type="omfile" DynaFile="{{ app }}-{{ item.name }}") stop }}
8+
then { action(type="omfile" DynaFile="{{ app }}-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }}
119
{% endfor %}
1210

1311
{% for stepupapp in stepupapps %}
14-
if $programname == "stepup-{{ stepupapp }}" then { action(type="omfile" DynaFile="stepup-{{ stepupapp }}-{{item.name }}") stop }
15-
if $programname == "{{ stepupapp }}" and $msg startswith "{{ stepupapp }}" then { action(type="omfile" DynaFile="apache-{{ stepupapp }}-{{item.name }}") stop }
16-
if $programname == "{{ stepupapp }}" then { action(type="omfile" DynaFile="stepup-{{ stepupapp }}-{{item.name }}") stop }
17-
if $programname == "Apache-{{ stepupapp }}" then { action(type="omfile" DynaFile="apache-{{ stepupapp }}-{{item.name }}") stop }
12+
if $programname == "stepup-{{ stepupapp }}" then { action(type="omfile" DynaFile="stepup-{{ stepupapp }}-{{item.name }}" {{ rsyslog_dir_file_modes }}) stop }
13+
if $programname == "{{ stepupapp }}" and $msg startswith "{{ stepupapp }}" then { action(type="omfile" DynaFile="apache-{{ stepupapp }}-{{item.name }}" {{ rsyslog_dir_file_modes }}) stop }
14+
if $programname == "{{ stepupapp }}" then { action(type="omfile" DynaFile="stepup-{{ stepupapp }}-{{item.name }}" {{ rsyslog_dir_file_modes }}) stop }
15+
if $programname == "Apache-{{ stepupapp }}" then { action(type="omfile" DynaFile="apache-{{ stepupapp }}-{{item.name }}" {{ rsyslog_dir_file_modes }}) stop }
1816
{% endfor %}
19-
if $programname == "Apache-azuremfa" then { action(type="omfile" DynaFile="apache-azure-mfa-{{ item.name }}") stop }
17+
if $programname == "Apache-azuremfa" then { action(type="omfile" DynaFile="apache-azure-mfa-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
2018

2119

2220
{% endif %}
23-
if $programname == "audispd" then { action(type="omfile" DynaFile="auditd-{{ item.name }}") stop }
24-
if $programname == "audit" then { action(type="omfile" DynaFile="auditd-{{ item.name }}") stop }
25-
if $programname == "audisp-syslog" then { action(type="omfile" DynaFile="auditd-{{ item.name }}") stop }
26-
if $programname == "-bash" then { action(type="omfile" DynaFile="bash-{{ item.name }}") stop }
27-
if $programname == "authpriv" then { action(type="omfile" dynafile="secure-{{ item.name }}") stop }
28-
if $msg contains "-- MARK --" then { action(type="omfile" DynaFile="MARK-{{ item.name }}") stop }
21+
if $programname == "audispd" then { action(type="omfile" DynaFile="auditd-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
22+
if $programname == "audit" then { action(type="omfile" DynaFile="auditd-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
23+
if $programname == "audisp-syslog" then { action(type="omfile" DynaFile="auditd-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
24+
if $programname == "-bash" then { action(type="omfile" DynaFile="bash-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
25+
if $programname == "authpriv" then { action(type="omfile" Dynafile="secure-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
26+
if $msg contains "-- MARK --" then { action(type="omfile" DynaFile="MARK-{{ item.name }}" {{ rsyslog_dir_file_modes }}) stop }
2927

3028
*.* ?hostleft-{{ item.name }}

0 commit comments

Comments
 (0)