thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Intermediate

Ansible Module

A discrete unit of code that Ansible executes to perform a task, such as installing packages or configuring interfaces.

Definition

Modules are idempotent and return JSON results. They are referenced by fully qualified collection name (FQCN) such as ansible.builtin.copy or cisco.ios.ios_interfaces. Resource modules manage network config declaratively with states such as merged, replaced, overridden, and deleted.

Example

ansible.builtin.dnf: {name: httpd, state: latest}

Exam tip

Prefer purpose-built modules over command/shell, which are not idempotent by default.

Related terms