Member-only story

Load and Unload Kernel Modules in Linux — Ansible module modprobe

How to automate the Linux Kernel module loading of the “dummy” module with parameters on an example machine with Ansible.

Luca Berton
5 min readJan 12, 2022

How to Load and Unload Kernel Modules in Linux with Ansible?

I’m going to show you a live demo with some simple Ansible code.

I’m Luca Berton and welcome to today’s episode of Ansible Pilot.

Ansible Load and Unload Kernel Modules in Linux

  • community.general.modprobe
  • Load or unload kernel modules

Today we’re talking about the Ansible module modprobe.

The full name is `community.general.modprobe`, which means that is part of the collection of modules “community.general” maintained by the Ansible Community.

The purpose of the module is to Load or unload kernel modules.

Parameters

  • name string — Name of kernel module
  • params string — Modules parameters
  • state string — present/absent — Load / Unload

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet