Puppet Class: cassandra::system::swapoff
- Defined in:
- manifests/system/swapoff.pp
Overview
Disable swap on the node as suggested at docs.datastax.com/en/landing_page/doc/landing_page/recommendedSettingsLinux.html
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'manifests/system/swapoff.pp', line 9
class cassandra::system::swapoff (
$device = undef,
$mount = 'swap',
$path = '/proc/swaps',
) {
exec { 'Disable Swap':
command => 'swapoff --all',
onlyif => "grep -q '^/' ${path}",
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
}
if $device {
mount { $mount:
ensure => absent,
device => $device,
fstype => 'swap',
}
}
}
|