community.general.modprobe (1.3.11) — module

Load or unload kernel modules

Authors: David Stygstra (@stygstra), Julien Dauphant (@jdauphant), Matt Jeffery (@mattjeffery)

Install collection

Install with ansible-galaxy collection install community.general:==1.3.11


Add to requirements.yml

  collections:
    - name: community.general
      version: 1.3.11

Description

Load or unload kernel modules.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add the 802.1q module
  community.general.modprobe:
    name: 8021q
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add the dummy module
  community.general.modprobe:
    name: dummy
    state: present
    params: 'numdummies=2'

Inputs

    
name:
    description:
    - Name of kernel module to manage.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether the module should be present or absent.
    type: str

params:
    default: ''
    description:
    - Modules parameters.
    type: str