Redirect all logs to one or more log servers. Choose between UDP or TCP, defaults to UDP. Will drop all logs lower than EMERG/PANIC if connection is interrupted and queue gets full.
Important! Sends logs unencrypted to remote syslog server.
3.0.0
--- Add Unsible-core 2.16. Removed support for Ubuntu xenial and bionic2.2.0
--- Support Ubuntu 24.042.1.1
--- Allow Fedora CoreOS 392.1.0
--- Initial support for Fedora CoreOS, but with no tests2.0.1
--- bug fix, ansible-lint2.0.0
--- updated ansible to 2.12.91.5.0
--- add RHEL9 and CentOS Stream 8 support1.4.0
--- add jammy support; remove centos8 support1.3.0
--- add rhel8 support; remove trusty and centos6 support1.2.0
--- remove ubuntu precise from testing1.1.1
--- fix lint warnings1.1.0
--- added ubuntu focal, 20.041.0.6
--- tested with Ansible 2.9.111.0.5
--- prepare for github1.0.4
--- bugfix, error when running in check mode1.0.3
--- install rsyslog even in check mode1.0.2
--- bugfix, allow running Ansible in check mode1.0.1
--- fixed missing default1.0.0
--- initial rolemaster
--- latest development version
This role is limited to
- Ubuntu 24.04 - Noble
- Ubuntu 22.04 - Jammy
- Ubuntu 20.04 - Focal
- CentOS 7
- CentOS Stream 8
- RHEL 8
- RHEL 9
- Fedora CoreOS 38
- Fedora CoreOS 39
rsyslog_journald_size
---1G
rsyslog_config
--- list of dicts configuring syslog servers - see below for dictionary keywords, default[]
type
--- syslog type - defaults to forward, defaultomfwd
resume_retry_count
--- number of retries before loosing data, default-1
queue_type
--- which kind of queue to use, defaultLinkedList
queue_size
--- max size of the queue, default10000
queue_save_on_shutdown
--- save state of queue on shutdown, defaulttrue
target_ip
--- destination syslog server, requiredtarget_port
--- destination syslog port, default514
target_protocol
--- protocol to use when talking to syslog server, defaultudp
The RHEL8 image needs to be registered with RedHat to install packages.
- hosts: servers
roles:
- role: rsyslog
rsyslog_config:
- target_ip: 10.100.10.10
target_protocol: udp
queue.discardseverity=”8”)
NOTICE: Fedora CoreOS is tested manually, but currently no automatic tests are added for FCOS.
To test RHEL8 with vagrant, install vagrant-register
vagrant plugin install vagrant-registration
cd tests
vagrant up
Log into the syslog server and look at the logs.
vagrant ssh syslog
cd /var/log
find
Run role on all OSes again.
vagrant provision
This uses cluster ssh to work with all vagrant boxes at the same time.
vagrant ssh-config > ~/.ssh/config
cat ~/.ssh/config | grep ^Host | cut -d\ -f2 | xargs cssh
GPLv2
Created 2020 by IT Infrastructure at MET Norway
Contactpoint: IT Infrastructure Basis Team