Documentation
PLEASE NOTE: This document applies to latest version and not to the latest stable release v2.19
Documentation for other releases can be found by using the version selector in the top right of any doc page.modprobe
Load or unload kernel modules.
Attributes
check_mode:
support: full
Parameters
| Parameter | Required | Type | Values | Description |
|---|---|---|---|---|
| name | true | string | Name of kernel module to manage. | |
| params | string | Module parameters. [default: ""] |
||
| persistent | string | disabled absent present |
Persistency between reboots for configured module. Creates files in /etc/modules-load.d/ and /etc/modprobe.d/. [default: "disabled"] |
|
| state | string | present absent |
Whether the module should be present or absent. [default: "present"] |
Examples
- name: Load overlay module for Docker
modprobe:
name: overlay
state: present
- name: Load br_netfilter with parameters
modprobe:
name: br_netfilter
params: nf_conntrack_brnetfilter=1
state: present
- name: Ensure wireguard is loaded at boot
modprobe:
name: wireguard
state: present
persistent: present
- name: Unload a module
modprobe:
name: dummy
state: absent