Puppet Class: kmod
- Defined in:
- manifests/init.pp
Overview
Class: kmod
Ensures a couple of mandatory files are present before managing their content.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'manifests/init.pp', line 8
class kmod (
Optional[Hash] $list_of_aliases = {},
Optional[Hash] $list_of_blacklists = {},
Optional[Hash] $list_of_installs = {},
Optional[Hash] $list_of_loads = {},
Optional[Hash] $list_of_options = {},
){
if versioncmp($::augeasversion, '0.9.0') < 0 {
fail('Augeas 0.10.0 or higher required')
}
file { '/etc/modprobe.d': ensure => directory }
file { [
'/etc/modprobe.d/modprobe.conf',
'/etc/modprobe.d/aliases.conf',
'/etc/modprobe.d/blacklist.conf',
]: ensure => file,
}
$list_of_aliases.each | $name, $data | {
kmod::alias { $name:
* => $data,
}
}
$list_of_blacklists.each | $name, $data | {
kmod::blacklist { $name:
* => $data,
}
}
$list_of_installs.each | $name, $data | {
kmod::install { $name:
* => $data,
}
}
$list_of_loads.each | $name, $data | {
kmod::load { $name:
* => $data,
}
}
$list_of_options.each | $name, $data | {
kmod::option { $name:
* => $data,
}
}
}
|