diff --git a/README.md b/README.md index 575520a..ebf1a6a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ and configuration can be overridden, for additional informations please have a l **use_repo**: Use Adiscon rsyslog official package repository (default: "False") **repo_releasever**: Default rsyslog major release repository version to use (default: 8) +Additional Role Variables: +-------------- +**rsyslog_custom_config**: Use a custom template to use as main configuration file (eg: rsyslog_custom_config: /path/to/rsyslog_custom.j2) + Dependencies ------------ @@ -69,7 +73,19 @@ Example Playbook - 'if $programname == "dovecot" and $syslogseverity <= "6" then ~' - '& ~' ``` -3) Enable rsyslog server +3) Install rsyslog, and specify a custom configuration template +```yaml +- hosts: all + remote_user: root + sudo: no + vars: + rsyslog_default_config: False + rsyslog_custom_config: /home/servers/foo.bar/templates/rsyslog_custom.j2 + roles: + - role: rsyslog + +``` +4) Enable rsyslog server ```yaml - hosts: all roles: diff --git a/tasks/main.yml b/tasks/main.yml index 1725a99..98ecde0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,7 +26,7 @@ - rsyslog - files template: > - src=rsyslog.conf.j2 + src={{ rsyslog_custom_config | default('rsyslog.conf.j2') }} dest={{ rsyslog_main_config }} owner={{ rsyslog_file_owner }} group={{ rsyslog_file_group }}