diff options
author | Lance Albertson <lance@osuosl.org> | 2019-09-16 11:32:16 -0700 |
---|---|---|
committer | Lance Albertson <lance@osuosl.org> | 2019-09-16 11:32:28 -0700 |
commit | 1d660831dafd2a6d63b3517342dffe6228437241 (patch) | |
tree | 6828d583b5684beed9da34db3b5bb030d4654b2f | |
parent | ec526c9c40e0a320d75552d208e526d7719b4045 (diff) | |
download | chef-1d660831dafd2a6d63b3517342dffe6228437241.tar.gz |
Add example documentation for kernel_module resource
Signed-off-by: Lance Albertson <lance@osuosl.org>
-rw-r--r-- | lib/chef/resource/kernel_module.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/chef/resource/kernel_module.rb b/lib/chef/resource/kernel_module.rb index 3dc879adf5..d25d512a51 100644 --- a/lib/chef/resource/kernel_module.rb +++ b/lib/chef/resource/kernel_module.rb @@ -15,6 +15,52 @@ class Chef description "Use the kernel_module resource to manage kernel modules on Linux systems. This resource can load, unload, blacklist, disable, install, and uninstall modules." introduced "14.3" + examples <<~DOC + Install and load a kernel module, and ensure it loads on reboot. + ```ruby + kernel_module 'loop' + ``` + Install and load a kernel with a specific set of options, and ensure it loads on reboot. Consult kernel module + documentation for specific options that are supported. + ```ruby + kernel_module 'loop' do + options [ + 'max_loop=4', + 'max_part=8' + ] + end + ``` + Load a kernel module. + ```ruby + kernel_module 'loop' do + action :load + end + ``` + Unload a kernel module and remove module config, so it doesn’t load on reboot. + ```ruby + kernel_module 'loop' do + action :uninstall + end + ``` + Unload kernel module. + ```ruby + kernel_module 'loop' do + action :unload + end + ``` + Blacklist a module from loading. + ```ruby + kernel_module 'loop' do + action :blacklist + end + ``` + Disable a kernel module. + ```ruby + kernel_module 'loop' do + action :disable + end + ``` + DOC property :modname, String, description: "An optional property to set the kernel module name if it differs from the resource block's name.", |