dmitrii-ageev.rsyslog
RSYSLOG Role for Ansible
This role helps you install and set up the RSYSLOG log processing server on Linux computers using Ansible.
Requirements
You need root access to use this role.
Role Variables
This role includes everything you need by default. Check the defaults/main.yml
file for guidance on the default settings. You can change the role variables in your inventory, hosts, or group vars.
rsyslog__modules
: A list of dictionaries that specifies the RSYSLOG modules.name
: The name of the module.comment
: Optional description of the module.options
: Configuration settings for the module.
rsyslog__config
: A list of dictionaries that defines RSYSLOG configuration files and their settings.name
: The name of the file to be created in/etc/rsyslog.d/
.config
: An array of configuration sections (see the structure below).absent
: Optional. If specified, the file will be deleted.
The configuration section structure:
comment
: Optional description for the section.options
: Directives for RSYSLOG. Check the RSYSLOG manual for details.
Example Playbook
#
# example.yml
#
- name: Change rsyslog settings
hosts: host.domain.net
become: true
roles:
- role: rsyslog
rsyslog__modules:
- comment: This sets up a TCP server on port 514 and allows 500 connections
name: imtcp
options: |
$InputTCPServerRun 514
$InputTCPMaxSessions 500
rsyslog__config:
- file: "99-iptables.conf"
config:
- comment: "This sends firewall messages to iptables.log."
options: |
:msg, regex, "^\[ *[0-9]*\.[0-9]*\] IPT" -/var/log/iptables.log
- comment: "Logging for the INND system."
options: |
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
License
GNU General Public License v2.0
Author Information
Dmitrii Ageev d.ageev@gmail.com
Informazioni sul progetto
This role for deploying and configuring RSYSLOG log processing server.
Installa
ansible-galaxy install dmitrii-ageev.rsyslog
Licenza
gpl-2.0
Download
116
Proprietario