22.16.101. salt.modules.logrotate

Module for managing logrotate.

salt.modules.logrotate.set_(key, value, setting=None, conf_file='/etc/logrotate.conf')

Set a new value for a specific configuration line

CLI Example:

salt '*' logrotate.set rotate 2

Can also be used to set a single value inside a multiline configuration block. For instance, to change rotate in the following block:

/var/log/wtmp {
    monthly
    create 0664 root root
    rotate 1
}

Use the following command:

salt '*' logrotate.set /var/log/wtmp rotate 2

This module also has the ability to scan files inside an include directory, and make changes in the appropriate file.

salt.modules.logrotate.show_conf(conf_file='/etc/logrotate.conf')

Show parsed configuration

CLI Example:

salt '*' logrotate.show_conf

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.100. salt.modules.logadm

Next topic

22.16.102. salt.modules.lvs

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.