Ensure logrotate is Installed
An XCCDF Rule
Description
logrotate is installed by default. The logrotate
package can be installed with the following command:
$ sudo dnf install logrotate
Rationale
The logrotate package provides the logrotate services.
- ID
- xccdf_org.ssgproject.content_rule_package_logrotate_installed
- Severity
- Medium
- References
- Updated
Remediation - Puppet
include install_logrotate
class install_logrotate {
package { 'logrotate':
ensure => 'installed',
}
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- NIST-800-53-CM-6(a)
- PCI-DSS-Req-10.7
Remediation - script:kickstart
package install logrotate
Remediation - OS Build Blueprint
[[packages]]
name = "logrotate"
version = "*"
Remediation - script:bootc
dnf install logrotate
Remediation - Anaconda Pre-Install Instructions
package --add=logrotate
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
if ! rpm -q --quiet "logrotate" ; then
dnf install -y "logrotate"
fi