Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
- Puppet >= 7.24 < 9.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'deric-tuned', '0.4.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-tuned
A module to manage tuneD service and its configuration.
Usage
Apply defaults, start service use auto-detected profile:
include tuned
Global configuration (typically stored in /etc/tuned/tuned-main.conf
)
tuned::main:
# Whether to use daemon. Without daemon it just applies tuning. It is
# not recommended, because many functions don't work without daemon,
# e.g. there will be no D-Bus, no rollback of settings, no hotplug,
# no dynamic tuning, ...
daemon: 1
# Dynamicaly tune devices, if disabled only static tuning will be used.
dynamic_tuning: 1
# How long to sleep before checking for events (in seconds)
# higher number means lower overhead but longer response time.
sleep_interval: 1
# Update interval for dynamic tunings (in seconds).
# It must be multiply of the sleep_interval.
update_interval: 10
# Recommend functionality, if disabled "recommend" command will be not
# available in CLI, daemon will not parse recommend.conf but will return
# one hardcoded profile (by default "balanced").
recommend_command: 1
# Whether to reapply sysctl from /run/sysctl.d/, /etc/sysctl.d/ and
# /etc/sysctl.conf. If enabled, these sysctls will be re-appliead
# after TuneD sysctls are applied, i.e. TuneD sysctls will not
# override user-provided system sysctls.
reapply_sysctl: 1
Switch to a predefined profile:
tuned::profile: balanced
see tuned-adm list
for available options.
Custom profiles
Create custom profiles, first level key is the profile name, in this case custom
.
tuned::profiles:
custom:
main:
include: balanced
sysctl:
net.ipv4.tcp_fastopen: 3
This would generate /etc/tuned/custom/tuned.conf
file with corresponding configuration.
Operators =>
can be used by passing value starting with >
tuned::profile: io
tuned::profiles:
io:
disk-sd:
type: disk
readahead: '>4096'
Each section correspods to a plugin name. See tuned-adm list plugins
for available plugins, e.g.:
$ tuned-adm list plugins
rtentsk
systemd
video
vm
scsi_host
disk
script
sysctl
sysfs
eeepc_she
irqbalance
selinux
modules
usb
bootloader
mounts
cpu
audio
service
scheduler
net
Reference
Table of Contents
Classes
Public Classes
tuned
: Manage tuned configs and profiles
Private Classes
tuned::config
: Ensures tuned config files are up-to-datetuned::install
: Install required packagestuned::service
: Manage tuneD service
Defined types
tuned::profile
: A tuneD profile
Data types
Classes
tuned
Manage tuned configs and profiles
Examples
include tuned
Parameters
The following parameters are available in the tuned
class:
enable
manage_package
manage_service
manage_dependencies
package_ensure
service_ensure
service_name
active_profile
packages
dependencies
main_config
main
profile
profiles_path
profiles
enable
Data type: Boolean
Whether OS tuning is enabled
manage_package
Data type: Boolean
Whether tuned package should be managed.
manage_service
Data type: Boolean
Whether service should be managed.
manage_dependencies
Data type: Boolean
Whether extra dependencies (might be used by plugins) should be installed.
package_ensure
Data type: String
Either specific version or installed
| present
| latest
service_ensure
Data type: String
service_name
Data type: String
Name of the service
active_profile
Data type: String[1]
Name of the file containing curretly active profile (located in main config directory)
packages
Data type: Array[String[1]]
Packages to be installed by this module.
dependencies
Data type: Array[String[1]]
Extra packages required by plugins.
Default value: []
main_config
Data type: Stdlib::AbsolutePath
Path to the tuned-main.conf file
main
Data type: Tuned::Main
Key-value configs to override tuned-main.conf
Default value: {}
profile
Data type: Optional[String]
Currently active profile, if not set will be selected automatically.
Use tuned-adm list
to see available profiles
Default value: undef
profiles_path
Data type: Stdlib::AbsolutePath
Path to profiles directory
profiles
Data type: Hash
Hash containing definition of custom profiles
Default value: {}
Defined types
tuned::profile
Manages profile config
Examples
tuned::profile { 'high-performance': }
Parameters
The following parameters are available in the tuned::profile
defined type:
profile_name
Data type: Pattern[/^[\w\-]+$/]
Name of the profile
Default value: $title
ensure
Data type: Enum['present', 'absent']
Default value: present
config
Data type: Tuned::Config
multi-level ini config with sections
Default value: {}
profiles_path
Data type: Stdlib::Absolutepath
Path to profiles
Default value: $tuned::profiles_path
Data types
Tuned::Config
The Tuned::Config data type.
Alias of
Hash[String[1], Hash[
String[1], Variant[String, Numeric, Boolean]
]]
Tuned::Main
The Tuned::Main data type.
Alias of Hash[String[1], Variant[String, Numeric, Boolean]]
Changelog
All notable changes to this project will be documented in this file.
0.4.0 [2024-08-29]
Features
- Support passing
=>
operator
0.3.1 [2024-08-27]
Features
- Optionally install plugin dependencies
0.3.0 [2024-08-27]
Bugfixes
- Ensure profiles are defined before activating them
0.2.1 [2024-08-27]
Bugfixes
- Remove empty line in template
0.2.0 [2024-08-09]
Bugfixes
- Remove unmanaged lines in profiles (switched to epp template instead of
ini_settings
)
0.1.0 [2024-08-09]
- Initial release
- Basic tuned management
- Hierarchical configuration of tuned profiles
Dependencies
- puppetlabs/stdlib (>= 9.0.0 < 10.0.0)
- puppetlabs/inifile (>= 1.5.0 < 7.0.0)