Ansible module
A small program that knows how to manage one kind of thing, such as a file, a package or a service, and that a task calls to do its work.
In more detail
For each task, Ansible copies the module to the managed node, runs it with the task's arguments, and reads back a JSON result saying whether it changed anything. Good modules compare the current state with the one requested and act only on the difference, which is where idempotency comes from. Modules are distributed in collections and named by their fully qualified collection name, such as ansible.builtin.copy.
Related terms
- module arguments — The settings you give a module to describe what you want, such as path=demo state=directory for the file module.
- idempotency — The property of an operation that gives the same result whether you run it once or many times, because a repeat run finds nothing left to do.
- Ansible collection — A distribution package of Ansible content, such as modules, plugins, roles and documentation, published under a namespace.
- fully qualified collection name — The full name of a module, plugin or role including its collection, such as ansible.builtin.copy rather than just copy.
- task — One step in a play that calls a single module with arguments to bring one thing on a host to the state you want.
Taught in
- What Configuration Management Is — Ansible Configuration Management at Scale
- Ansible Architecture And The Control Node — Ansible Configuration Management at Scale
- Installing Ansible — Ansible Configuration Management at Scale
- Your First Ad Hoc Command — Ansible Configuration Management at Scale
- Host Groups And Host Variables — Ansible Configuration Management at Scale
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Playbook Syntax And YAML — Ansible Configuration Management at Scale
- Writing Your First Playbook — Ansible Configuration Management at Scale
- Modules And Idempotency — Ansible Configuration Management at Scale
- Check Mode And Diff — Ansible Configuration Management at Scale
- Handlers And Notify — Ansible Configuration Management at Scale
- Gathering Facts — Ansible Configuration Management at Scale
- Conditionals — Ansible Configuration Management at Scale
- Templates With Jinja — Ansible Configuration Management at Scale
- Error Handling With Block, Rescue And Always — Ansible Configuration Management at Scale
- Using Collections — Ansible Configuration Management at Scale
- Testing With Molecule — Ansible Configuration Management at Scale
- Performance, Forks And Best Practices — Ansible Configuration Management at Scale
- Graded On A Machine You Never Touched — RHCE in Ansible (EX294): Automate Red Hat Systems
- Exam Strategy: The First Fifteen Minutes And ansible-doc — RHCE in Ansible (EX294): Automate Red Hat Systems
- SSH Keys And An Account For Ansible — RHCE in Ansible (EX294): Automate Red Hat Systems
- Privilege Escalation: sudo Rules And become — RHCE in Ansible (EX294): Automate Red Hat Systems
- Anatomy Of A Playbook: Plays, Tasks And Modules — RHCE in Ansible (EX294): Automate Red Hat Systems
- Variables And Where They Win: group_vars, host_vars And Play Vars — RHCE in Ansible (EX294): Automate Red Hat Systems
- Facts And Magic Variables: Let Each Node Describe Itself — RHCE in Ansible (EX294): Automate Red Hat Systems
- Deploying Files: file, copy, lineinfile And blockinfile — RHCE in Ansible (EX294): Automate Red Hat Systems
- Loops: One Task, Many Items — RHCE in Ansible (EX294): Automate Red Hat Systems
- Handlers And Failure: notify, block, rescue And always — RHCE in Ansible (EX294): Automate Red Hat Systems
- ansible-navigator: The Settings File The Exam Reads — RHCE in Ansible (EX294): Automate Red Hat Systems
- Finding Modules In Collections: ansible-doc And navigator — RHCE in Ansible (EX294): Automate Red Hat Systems
- requirements.yml: Installing Roles And Collections — RHCE in Ansible (EX294): Automate Red Hat Systems
- RHEL System Roles: timesync And selinux From A Collection — RHCE in Ansible (EX294): Automate Red Hat Systems
- Packages And Repositories: yum_repository And dnf — RHCE in Ansible (EX294): Automate Red Hat Systems
- Services And Boot Targets: Started Is Not Enabled — RHCE in Ansible (EX294): Automate Red Hat Systems
- firewalld: Permanent, Immediate And The Reboot — RHCE in Ansible (EX294): Automate Red Hat Systems
- Storage: Partitions, Volume Groups And Volumes Where The Disk Exists — RHCE in Ansible (EX294): Automate Red Hat Systems
- File Systems And Mounts: mounted, present And UUIDs — RHCE in Ansible (EX294): Automate Red Hat Systems
- Archives: archive And unarchive On The Managed Nodes — RHCE in Ansible (EX294): Automate Red Hat Systems
- Scheduling: cron Jobs With Names, And Timers — RHCE in Ansible (EX294): Automate Red Hat Systems
- SELinux: Labels, Ports And Booleans That Persist — RHCE in Ansible (EX294): Automate Red Hat Systems
- Users And Groups From A List, With Passwords That Settle — RHCE in Ansible (EX294): Automate Red Hat Systems
- Jinja Templates: One File, A Different Text Per Host — RHCE in Ansible (EX294): Automate Red Hat Systems
- Ansible Vault: Secrets Encrypted, Runs Without A Prompt — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: A Web Node From A Ticket — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: Storage Only Where The Disk Exists — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: People, Passwords And sudo From The Vault — RHCE in Ansible (EX294): Automate Red Hat Systems
- Mock Exam, Part 2: Real Machines And The Patterns That Fail — RHCE in Ansible (EX294): Automate Red Hat Systems