Skip to content

Commit

Permalink
Adding syslog support
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Gramic authored and richm committed Jan 9, 2024
1 parent 5234dda commit 3c18dcf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Defaults to `true`.
time span after which journald synchronizes currently used journal file to disk.
By default role doesn't alter currently used value.

- `journald_forward_to_syslog` - boolean variable, control whether log messages
received by the journal daemon shall be forwarded to a traditional syslog daemon.
Defaults to `false`.

## Example Playbook

```yaml
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ journald_max_file_size: 0
journald_per_user: false
journald_compression: true
journald_sync_interval: 0
journald_forward_to_syslog: false
1 change: 1 addition & 0 deletions templates/journald.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RutimeMaxFiles={{ journald_max_files }}
RuntimeMaxFileSize={{ journald_max_file_size }}M
{% endif %}
Compress={{ journald_compression | bool | ternary("yes", "no") }}
ForwardToSyslog={{ journald_forward_to_syslog | bool | ternary("yes", "no") }}
{# SyncInterval= #}
{% if journald_sync_interval | int != 0 %}
SyncIntervalSec={{ journald_sync_interval }}m
Expand Down

0 comments on commit 3c18dcf

Please sign in to comment.