robertdebock.rsyslog
Ansible Role: Rsyslog
This role installs and sets up rsyslog on your system.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here's a simple example that you can use, taken from molecule/default/converge.yml
. This is tested with each update.
---
- name: Setup Rsyslog
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.rsyslog
Before running this, make sure your machine is set up. In CI, this setup is done using molecule/default/prepare.yml
:
---
- name: Prepare Environment
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
For more details on how to use these roles, see the full guide here.
Role Variables
Default values for the role variables are in defaults/main.yml
:
---
# Default settings for rsyslog
# Set to 'yes' to make the server receive logs
rsyslog_receiver: false
# Set the IP address or hostname to forward logs to another server
# rsyslog_remote: server1.example.com
# This sets which messages to send to the remote server
rsyslog_remote_selector: "*.*"
# Use TCP for remote logging if set to 'yes'
rsyslog_remote_tcp: true
# Port to use for remote logging
rsyslog_remote_port: 514
# Mode settings for new directories and files
rsyslog_dircreatemode: "0700"
rsyslog_filecreatemode: "0644"
# Default modules enabled
rsyslog_mods:
- imuxsock
- imjournal
# Deploy a minimal default configuration
rsyslog_deploy_default_config: true
# Default logging rules
rsyslog_default_rules:
- { rule: '*.info;mail.none;authpriv.none;cron.none', logpath: '/var/log/messages' }
...
Requirements
- You will need the pip packages listed in requirements.txt.
State of Used Roles
This role relies on other roles for system preparation. You can also set up your system in your own way.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
Context
This role is part of a variety of compatible roles. For more information, check out the documentation for these roles here.
Compatibility
This role has been tested on the following container images:
Container | Tags |
---|---|
Alpine | all |
Amazon | Candidate |
EL | 9 |
Debian | all |
Fedora | all |
Ubuntu | all |
You need at least Ansible version 2.12. Tests have been done on previous and current versions.
If you find any issues, please report them on GitHub.
License
This role is under the Apache-2.0 license.
Author Information
Created by robertdebock.
If you’d like, please consider sponsoring me.
Install and configure rsyslog on your system.
ansible-galaxy install robertdebock.rsyslog