Add ryslog stop statement at parsing end

For some osp versions there are more statements after the stop
statement in 05-outputs.conf. Since config files are loaded in
lexical order and we don'totally blow away the existing config
the only way to be 100% sure that stop is the last thing
loaded is to insert it at the end of the main config.

This causes a bug in the adiscon repo. But the official CentOS versions
of all the packages we need are finally available. So we switch to those

Change-Id: I2109bde6572cc8ccf7d633ed1a795bf8449d1a89
This commit is contained in:
jkilpatr 2017-10-17 07:57:57 -04:00 committed by Justin Kilpatrick
parent df910d0cfa
commit 4b0d39f290
4 changed files with 17 additions and 9 deletions

View File

@ -10,7 +10,6 @@
- rsyslog
- rsyslog-elasticsearch
- rsyslog-mmjsonparse
- rsyslog-mmutf8fix
register: install_rsyslog
ignore_errors: true
@ -33,16 +32,16 @@
- name: Add repository
yum_repository:
name: rsyslog_v8
description: Up to date rsyslog
baseurl: http://rpms.adiscon.com/v8-stable/epel-7/x86_64/
name: CentOS-7-Base
description: Core CentOS7 Packages
baseurl: http://mirror.centos.org/centos/7/os/$basearch/
become: true
when: install_rsyslog|failed
- name: Add key
rpm_key:
state: present
key: http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon
key: https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
become: true
when: install_rsyslog|failed
@ -55,5 +54,4 @@
- rsyslog
- rsyslog-elasticsearch
- rsyslog-mmjsonparse
- rsyslog-mmutf8fix
when: install_rsyslog|failed

View File

@ -83,6 +83,12 @@
dest: /etc/rsyslog.d/listen.conf
become: true
- name: Template primary config
template:
src: rsyslog.conf.j2
dest: /etc/rsyslog.conf
become: true
- name: Install selinux utils
yum:
name: policycoreutils-python

View File

@ -19,6 +19,3 @@ action(
{% if rsyslog_forwarding and not rsyslog_aggregator %}
action(type="omfwd" Target="{{rsyslog_aggregator_server}}" Port="{{rsyslog_aggregator_port}}" Protocol="tcp" Template="ViaQ_SyslogProtocol23Format")
{% endif %}
# Drop messages before they get to /var/log/messages
stop

View File

@ -0,0 +1,7 @@
# Browbeat Rsyslog config defaults blown away for consistency in logging
# Include all config files in /etc/rsyslog.d/ │
$IncludeConfig /etc/rsyslog.d/*.conf
# Prevents messages from getting dumped to /var/log/messages
stop