Files
ansible-role-rsyslog/README.md

86 lines
1.9 KiB
Markdown
Raw Normal View History

2015-04-20 01:46:12 +02:00
ansible-rsyslog
=========
This role installs and configures rsyslog.
2015-09-04 00:17:28 +02:00
Supported Platforms
-------------------
* RHEL 6
* Archlinux
* Ubuntu Trusty
* Debian Wheezy
It will likely run on other platforms, just drop in vars/ a new file to support your os variant, vars are parsed in the following order/format:
* {{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml
* {{ ansible_distribution }}.yml
* {{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml
* {{ ansible_os_family }}.yml"
2015-04-20 01:46:12 +02:00
Requirements
------------
None at this time.
Default Role Variables
--------------
2015-09-04 00:17:28 +02:00
By default this role will install rsyslog and provide a minimal configuration, however variables can be passed to this role
and configuration can be overridden, for additional informations please have a look to **defaults/main.yml**
2015-04-20 02:00:01 +02:00
**rsyslog_default_config**: Setup a default basic configuration stanza (default: "True")
2015-04-20 01:46:12 +02:00
Dependencies
------------
None at this time.
Example Playbook
----------------
2015-09-04 00:17:28 +02:00
1) Just install rsyslog with default configuration (it will be placed in /etc/rsyslog.d/)
```yaml
- hosts: all
remote_user: root
sudo: no
- roles:
2015-09-04 20:09:36 +02:00
- { role: rsyslog }
2015-09-04 00:17:28 +02:00
```
2) Install rsyslog, without default configuration and setup two different custom stanzas
```yaml
- hosts: all
remote_user: root
sudo: no
2015-09-04 20:09:36 +02:00
vars:
2015-09-04 00:17:28 +02:00
rsyslog_default_config: False
2015-09-04 20:09:36 +02:00
roles:
2015-09-04 00:17:28 +02:00
- role: rsyslog
items:
2015-09-04 20:09:36 +02:00
- name: "20-iptables"
lines:
- ':msg, contains, "iptables" /var/log/iptables.log'
- '& ~'
- name: "30-dovecot"
lines:
- 'if $programname == "dovecot" and $syslogseverity <= "6" then ~'
- '& ~'
2015-09-04 00:17:28 +02:00
```
2016-09-28 16:00:48 +02:00
3) Enable rsyslog server
```
- hosts: all
roles:
- { role: ../../roles/ansible-rsyslog-custom, "rsyslog_server": yes }
```
2015-04-20 01:46:12 +02:00
License
-------
GPLv2
Author Information
------------------
Alessio Cassibba (x-drum) http://blog.zerodev.it.