All Projects → robertdebock → ansible-role-rsyslog

robertdebock / ansible-role-rsyslog

Licence: Apache-2.0 License
Install and configure rsyslog on your system.

Programming Languages

Jinja
831 projects

Projects that are alternatives of or similar to ansible-role-rsyslog

ansible-role-fail2ban
Install and configure fail2ban on your system.
Stars: ✭ 42 (+200%)
Mutual labels:  installer, playbook, molecule, tox
Ansible Role Bootstrap
Prepare your system to be managed by Ansible.
Stars: ✭ 106 (+657.14%)
Mutual labels:  playbook, molecule, tox
ansible-role-dsvpn
Install and configure dsvpn on your system.
Stars: ✭ 18 (+28.57%)
Mutual labels:  playbook, molecule, tox
ansible-role-logrotate
Install and configure logrotate on your system.
Stars: ✭ 13 (-7.14%)
Mutual labels:  playbook, molecule, tox
ansible-role-dns
Install and configure dns on your system.
Stars: ✭ 39 (+178.57%)
Mutual labels:  playbook, molecule, tox
ansible-role-tomcat
Install and configure tomcat on your system.
Stars: ✭ 34 (+142.86%)
Mutual labels:  playbook, molecule, tox
Github
a module for building, searching, installing, managing, and mining Stata packages from GitHub
Stars: ✭ 56 (+300%)
Mutual labels:  package, installer
Slpkg
📦 Mirror of slpkg repository
Stars: ✭ 86 (+514.29%)
Mutual labels:  package, installer
ansible-snmp-exporter
Provision SNMP metrics exporter for prometheus monitoring
Stars: ✭ 18 (+28.57%)
Mutual labels:  molecule, tox
Ansible Grafana
Platform for analytics and monitoring
Stars: ✭ 340 (+2328.57%)
Mutual labels:  molecule, tox
ansible-blackbox-exporter
Blackbox prober exporter
Stars: ✭ 60 (+328.57%)
Mutual labels:  molecule, tox
aplus
Aplus Command Line Tool
Stars: ✭ 71 (+407.14%)
Mutual labels:  package, installer
Ansible Alertmanager
Deploy Prometheus Alertmanager service
Stars: ✭ 93 (+564.29%)
Mutual labels:  molecule, tox
Laravel Paket
Composer GUI. Manage Laravel dependencies from web interface without switching to command line!
Stars: ✭ 143 (+921.43%)
Mutual labels:  package, installer
Ansible Prometheus
Deploy Prometheus monitoring system
Stars: ✭ 758 (+5314.29%)
Mutual labels:  molecule, tox
ansible-coredns
Ansible provisioning of CoreDNS
Stars: ✭ 25 (+78.57%)
Mutual labels:  molecule, tox
Ansible Node Exporter
Provision basic metrics exporter for prometheus monitoring tool
Stars: ✭ 263 (+1778.57%)
Mutual labels:  molecule, tox
ansible-haproxy
Ansible HAproxy role for Unified OpenStack Installer and others.
Stars: ✭ 35 (+150%)
Mutual labels:  playbook, molecule
ansible-fluentd
Provision fluentd log collector
Stars: ✭ 20 (+42.86%)
Mutual labels:  molecule, tox
bali
Bali - Minimalist Golang build and packaging tool
Stars: ✭ 59 (+321.43%)
Mutual labels:  package, installer

rsyslog

Install and configure rsyslog on your system.

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.rsyslog

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: yes
  gather_facts: no

  roles:
    - role: robertdebock.bootstrap

Also see a full explanation and example on how to use these roles.

Role Variables

The default values for the variables are set in defaults/main.yml:

---
# defaults file for rsyslog

# To configure a server to receive logs, set rsyslog_receiver to yes.
rsyslog_receiver: no

# To forward logs to another server, set rsyslog_remote to the hostname or
# the ipaddress of the receiving rsyslog server.
# Not setting this variable will not forward logs.
# rsyslog_remote: server1.example.com

# If rsylog_remote is set, sets the "selector" pattern for determining which
# messages to send to the remote server.  Default "*.*" sends everything.
# See `man rsyslog.conf`.
rsyslog_remote_selector: "*.*"

# If rsylog_remote is set, use TCP if yes. UDP if no.
rsyslog_remote_tcp: yes

# If rsylog_remote is set, destination port to use.
rsyslog_remote_port: 514

# Set the mode for new directories; only available in legacy template.
rsyslog_dircreatemode: "0700"

# Set the mode for new files; only available in legacy template.
rsyslog_filecreatemode: "0644"

# Set the mods enabled
rsyslog_mods:
  - imuxsock
  - imjournal

# Configure rsyslog minimally (may be in conflict with custom configuration files)
rsyslog_deploy_default_config: yes

# Default rsyslogd rules
rsyslog_default_rules:
  - { rule: '*.info;mail.none;authpriv.none;cron.none', logpath: '/var/log/messages' }
  - { rule: 'authpriv.*', logpath: '/var/log/secure' }
  - { rule: 'mail.*', logpath: '-/var/log/maillog' }
  - { rule: 'cron.*', logpath: '/var/log/cron' }
  - { rule: '*.emerg', logpath: ':omusrmsg:*' }
  - { rule: 'uucp,news.crit', logpath: '/var/log/spooler' }
  - { rule: 'local7.*', logpath: '/var/log/boot.log' }

# Use the (obsolete) legacy, pre-v6 configuration file format, or the more
# modern # 'advanced' configuration file format available in v6 and up. The
# default is to use the 'legacy' format to not change config files for
# existing users of this role out of the blue.
# More information on the different formats on the rsyslog website:
# https://www.rsyslog.com/doc/v8-stable/configuration/conf_formats.html
rsyslog_config_file_format: legacy

# The rule conf to name to add to /etc/rsyslog.d/
# rsyslog_forward_rule_name: <to fill>

# Configure the rsyslog package to be `present`, or set to `latest` to install
# the latest available version.
rsyslog_package_state: present

# if set to false (legacy default to remain compatible to sysklogd), the domain
# part from a name that is within the same domain as the receiving system is
# stripped. If set to on, full names are always used.
rsyslog_preservefqdn: no

# Configure additional config files in /etc/rsyslog.d
# Example:
# rsyslog_rsyslog_d_files:
#   000-splunk:
#     content: |
#       auth,authpriv.* action(type="omfwd"
#                              target="splunk"
#                              port="514"
#                              protocol="tcp")
rsyslog_rsyslog_d_files: []

# Avoid sd_journal_get_cursor() failed: Cannot assign requested address messages
# due to logrotate
rsyslog_workaroundjournalbug: no

# Turns off message reception via local log socket
rsyslog_imuxsock_syssock: no

Requirements

Status of used roles

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

Compatibility

This role has been tested on these container images:

container tags
alpine all
amazon Candidate
el 8
debian all
fedora all
opensuse all
ubuntu all

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

Exceptions

Some roles can't run on a specific distribution or version. Here are some exceptions.

variation reason
archlinux/base target not found: rsyslog

If you find issues, please register them in GitHub

License

Apache-2.0

Author Information

Robert de Bock

Please consider sponsoring me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].