Loading and unloading of kernel modules.
The Kernel modules on a system can be managed cleanly with the kmod state
module:
kvm_amd:
kmod.present
pcspkr:
kmod.absent
-
salt.states.kmod.absent(name, persist=False, comment=True)
Verify that the named kernel module is not loaded
- name
- The name of the kernel module to verify is not loaded
- persist
- Delete module from /etc/modules
- comment
- Don't remove module from /etc/modules, only comment it
-
salt.states.kmod.present(name, persist=False)
Ensure that the specified kernel module is loaded
- name
- The name of the kernel module to verify is loaded
- persist
- Also add module to /etc/modules