Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8392461
administration.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
administration.pp
View Options
# Allows various adminstrative settings for Redis
# As documented in the FAQ and https://redis.io/topics/admin
#
# @example
# include redis::administration
#
# @example
# class {'redis::administration':
# disable_thp => false,
# }
#
# @param [Boolean] enable_overcommit_memory Enable the overcommit memory setting (Defaults to true)
# @param [Boolean] disable_thp Disable Transparent Huge Pages (Defaults to true)
# @param [String] somaxconn Set somaxconn value (Defaults to '65535')
#
# @author - Peter Souter
#
class
redis
::
administration
(
$enable_overcommit_memory
=
true
,
$disable_thp
=
true
,
$somaxconn
=
'65535'
,
)
{
if
$enable_overcommit_memory
{
sysctl
{
'vm.overcommit_memory'
:
ensure
=>
'present'
,
value
=>
'1'
,
}
}
if
$disable_thp
{
exec
{
'Disable Hugepages'
:
command
=>
'echo never > /sys/kernel/mm/transparent_hugepage/enabled'
,
path
=>
[
'/sbin'
,
'/usr/sbin'
,
'/bin'
,
'/usr/bin'
],
onlyif
=>
'test -f /sys/kernel/mm/transparent_hugepage/enabled'
,
unless
=>
'cat /sys/kernel/mm/transparent_hugepage/enabled | grep "\[never\]"'
,
}
}
if
$somaxconn
{
sysctl
{
'net.core.somaxconn'
:
ensure
=>
'present'
,
value
=>
$somaxconn,
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 6:59 PM (10 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398890
Attached To
R226 puppet-puppet-redis
Event Timeline
Log In to Comment