arillso.system.logging role – Logging management with multi-entry-point support

Note

This role is part of the arillso.system collection (version 1.0.5).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install arillso.system.

To use it in a playbook, specify: arillso.system.logging.

Entry point logrotate – Logrotate management entry point

Synopsis

  • Entry point for managing logrotate configurations

  • Configure log rotation policies

Parameters

Parameter

Comments

logging_logrotate_compress

boolean

Compress rotated log files

Choices:

  • false

  • true ← (default)

logging_logrotate_create

boolean

Create new log files after rotation

Choices:

  • false

  • true ← (default)

logging_logrotate_dateext

boolean

Use date extension for rotated log files

Choices:

  • false

  • true ← (default)

logging_logrotate_delaycompress

boolean

Delay compression to the next rotation cycle

Choices:

  • false ← (default)

  • true

logging_logrotate_entries

list / elements=dictionary

List of logrotate configurations

Default: []

firstaction

string

Script to run before all rotations

lastaction

string

Script to run after all rotations

name

string / required

Name of the logrotate configuration file

options

list / elements=string

List of logrotate directives

Default: []

path

string / required

Path to log file(s) to rotate

postrotate

string

Script to run after log rotation

prerotate

string

Script to run before log rotation

state

string

State of the logrotate configuration

Choices:

  • "present" ← (default)

  • "absent"

logging_logrotate_extra_options

list / elements=string

Extra global logrotate options

Default: []

logging_logrotate_include_dir

string

Directory for additional logrotate configurations

Default: "/etc/logrotate.d"

logging_logrotate_notifempty

boolean

Do not rotate empty log files

Choices:

  • false

  • true ← (default)

logging_logrotate_packages

list / elements=string

Packages required for logrotate

Default: ["logrotate"]

logging_logrotate_rotate

integer

Number of rotated log files to keep

Default: 4

logging_logrotate_su

string

Run logrotate as specified user/group

Default: ""

logging_logrotate_weekly

boolean

Enable weekly log rotation by default

Choices:

  • false

  • true ← (default)

Entry point main – Logging management with multi-entry-point support

Synopsis

  • Manages system logging via logrotate and rsyslog

  • Supports granular control via entry points

Parameters

Parameter

Comments

logging_backup_configs

boolean

Create backups before modifying configuration files

Choices:

  • false

  • true ← (default)

logging_debug_mode

boolean

Enable debug output for troubleshooting

Choices:

  • false ← (default)

  • true

logging_logrotate_compress

boolean

Compress rotated log files

Choices:

  • false

  • true ← (default)

logging_logrotate_create

boolean

Create new log files after rotation

Choices:

  • false

  • true ← (default)

logging_logrotate_dateext

boolean

Use date extension for rotated log files

Choices:

  • false

  • true ← (default)

logging_logrotate_delaycompress

boolean

Delay compression to the next rotation cycle

Choices:

  • false ← (default)

  • true

logging_logrotate_enabled

boolean

Enable logrotate management

Choices:

  • false

  • true ← (default)

logging_logrotate_entries

list / elements=dictionary

List of logrotate configurations

Default: []

firstaction

string

Script to run before all rotations

lastaction

string

Script to run after all rotations

name

string / required

Name of the logrotate configuration file

options

list / elements=string

List of logrotate directives

Default: []

path

string / required

Path to log file(s) to rotate

postrotate

string

Script to run after log rotation

prerotate

string

Script to run before log rotation

state

string

State of the logrotate configuration

Choices:

  • "present" ← (default)

  • "absent"

logging_logrotate_extra_options

list / elements=string

Extra global logrotate options

Default: []

logging_logrotate_include_dir

string

Directory for additional logrotate configurations

Default: "/etc/logrotate.d"

logging_logrotate_notifempty

boolean

Do not rotate empty log files

Choices:

  • false

  • true ← (default)

logging_logrotate_packages

list / elements=string

Packages required for logrotate

Default: ["logrotate"]

logging_logrotate_rotate

integer

Number of rotated log files to keep

Default: 4

logging_logrotate_su

string

Run logrotate as specified user/group

Default: ""

logging_logrotate_weekly

boolean

Enable weekly log rotation by default

Choices:

  • false

  • true ← (default)

logging_retry_count

integer

Number of retry attempts for tasks

Default: 3

logging_retry_delay

integer

Delay in seconds between retry attempts

Default: 5

logging_rsyslog_dir_create_mode

string

Directory creation mode for log directories

Default: "0755"

logging_rsyslog_enabled

boolean

Enable rsyslog management

Choices:

  • false

  • true ← (default)

logging_rsyslog_entries

list / elements=dictionary

List of rsyslog configurations

Default: []

content

string

Raw rsyslog configuration content

name

string / required

Name of the rsyslog configuration

priority

integer

Priority prefix for configuration file ordering

Default: 50

rules

list / elements=dictionary

Structured rsyslog rules (alternative to content)

Default: []

state

string

State of the rsyslog configuration

Choices:

  • "present" ← (default)

  • "absent"

logging_rsyslog_file_create_mode

string

File creation mode for log files

Default: "0640"

logging_rsyslog_file_group

string

Group for log files created by rsyslog

Default: "adm"

logging_rsyslog_file_owner

string

Owner for log files created by rsyslog

Default: "root"

logging_rsyslog_include_config

string

Glob pattern for included rsyslog configuration files

Default: "/etc/rsyslog.d/*.conf"

logging_rsyslog_klog_permit_non_kernel_facility

boolean

Allow non-kernel facility messages from klog

Choices:

  • false ← (default)

  • true

logging_rsyslog_main_queue_size

integer

Main message queue size

Default: 10000

logging_rsyslog_main_queue_type

string

Main message queue type

Default: "LinkedList"

logging_rsyslog_main_queue_worker_threads

integer

Number of worker threads for main queue

Default: 2

logging_rsyslog_modules

list / elements=string

Rsyslog input modules to load

Default: ["imuxsock", "imklog"]

logging_rsyslog_packages

list / elements=string

Packages required for rsyslog

Default: ["rsyslog"]

logging_rsyslog_preserve_fqdn

boolean

Preserve fully qualified domain name in logs

Choices:

  • false ← (default)

  • true

logging_rsyslog_remote_servers

list / elements=dictionary

List of remote syslog servers for forwarding

Default: []

host

string / required

Hostname or IP of remote syslog server

port

integer / required

Port of remote syslog server

protocol

string

Transport protocol

Choices:

  • "tcp"

  • "udp" ← (default)

logging_rsyslog_restart_on_change

boolean

Restart rsyslog when configuration changes

Choices:

  • false

  • true ← (default)

logging_rsyslog_service_enabled

boolean

Enable rsyslog service on boot

Choices:

  • false

  • true ← (default)

logging_rsyslog_service_state

string

State of the rsyslog service

Choices:

  • "started" ← (default)

  • "stopped"

  • "restarted"

  • "reloaded"

logging_rsyslog_traditional_log_format

boolean

Use traditional syslog log format

Choices:

  • false ← (default)

  • true

logging_rsyslog_work_directory

string

Working directory for rsyslog

Default: "/var/lib/rsyslog"

Entry point rsyslog – Rsyslog management entry point

Synopsis

  • Entry point for managing rsyslog configurations

  • Configure system logging and forwarding

Parameters

Parameter

Comments

logging_rsyslog_dir_create_mode

string

Directory creation mode for log directories

Default: "0755"

logging_rsyslog_entries

list / elements=dictionary

List of rsyslog configurations

Default: []

content

string

Raw rsyslog configuration content

name

string / required

Name of the rsyslog configuration

priority

integer

Priority prefix for configuration file ordering

Default: 50

rules

list / elements=dictionary

Structured rsyslog rules (alternative to content)

Default: []

state

string

State of the rsyslog configuration

Choices:

  • "present" ← (default)

  • "absent"

logging_rsyslog_file_create_mode

string

File creation mode for log files

Default: "0640"

logging_rsyslog_file_group

string

Group for log files created by rsyslog

Default: "adm"

logging_rsyslog_file_owner

string

Owner for log files created by rsyslog

Default: "root"

logging_rsyslog_include_config

string

Glob pattern for included rsyslog configuration files

Default: "/etc/rsyslog.d/*.conf"

logging_rsyslog_klog_permit_non_kernel_facility

boolean

Allow non-kernel facility messages from klog

Choices:

  • false ← (default)

  • true

logging_rsyslog_main_queue_size

integer

Main message queue size

Default: 10000

logging_rsyslog_main_queue_type

string

Main message queue type

Default: "LinkedList"

logging_rsyslog_main_queue_worker_threads

integer

Number of worker threads for main queue

Default: 2

logging_rsyslog_modules

list / elements=string

Rsyslog input modules to load

Default: ["imuxsock", "imklog"]

logging_rsyslog_packages

list / elements=string

Packages required for rsyslog

Default: ["rsyslog"]

logging_rsyslog_preserve_fqdn

boolean

Preserve fully qualified domain name in logs

Choices:

  • false ← (default)

  • true

logging_rsyslog_remote_servers

list / elements=dictionary

List of remote syslog servers for forwarding

Default: []

host

string / required

Hostname or IP of remote syslog server

port

integer / required

Port of remote syslog server

protocol

string

Transport protocol

Choices:

  • "tcp"

  • "udp" ← (default)

logging_rsyslog_restart_on_change

boolean

Restart rsyslog when configuration changes

Choices:

  • false

  • true ← (default)

logging_rsyslog_service_enabled

boolean

Enable rsyslog service on boot

Choices:

  • false

  • true ← (default)

logging_rsyslog_service_state

string

State of the rsyslog service

Choices:

  • "started" ← (default)

  • "stopped"

  • "restarted"

  • "reloaded"

logging_rsyslog_traditional_log_format

boolean

Use traditional syslog log format

Choices:

  • false ← (default)

  • true

logging_rsyslog_work_directory

string

Working directory for rsyslog

Default: "/var/lib/rsyslog"