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
/etc/modules/etc/modules, only comment itsalt.states.kmod.present(name, persist=False)¶Ensure that the specified kernel module is loaded
/etc/modulesDocs for previous releases are available on readthedocs.org.
Latest Salt release: 2015.8.7