module arguments
The settings you give a module to describe what you want, such as path=demo state=directory for the file module.
In more detail
On the command line they follow -a as key=value pairs, quoted when there is more than one. In a playbook they are written as a YAML mapping indented under the module name. Most arguments describe a state rather than an action, which is what lets the module decide whether anything needs to change.
Related terms
- 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.
- ad hoc command — A single Ansible module run against a set of hosts straight from the command line, without writing a playbook.
- mapping — A collection of named values, each written key: value, where every key appears once.
Taught in
- 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
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Playbook Syntax And YAML — Ansible Configuration Management at Scale
- Modules And Idempotency — Ansible Configuration Management at Scale
- Anatomy Of A Playbook: Plays, Tasks And Modules — RHCE in Ansible (EX294): Automate Red Hat Systems
- Deploying Files: file, copy, lineinfile And blockinfile — 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
- Ansible Vault: Secrets Encrypted, Runs Without A Prompt — RHCE in Ansible (EX294): Automate Red Hat Systems