ansible-lint
The community linter for Ansible playbooks, roles and collections, which checks them against rules of good practice.
In more detail
It flags things such as short module names instead of fully qualified names, become_user without become, tasks without names and commands that could be modules. Running it in the pipeline turns review rules into automatic checks.
Related terms
- linter — A tool that reads code or configuration without running it and flags likely mistakes and style problems.
- 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.
- become — The Ansible keyword that switches on privilege escalation, so a task or a whole play runs as another account, root by default.
- pipeline — An automated sequence of steps, such as build, test, scan and publish, that runs on every change.
Taught in
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Modules And Idempotency — Ansible Configuration Management at Scale
- Testing With Molecule — Ansible Configuration Management at Scale
- Graded On A Machine You Never Touched — RHCE in Ansible (EX294): Automate Red Hat Systems
- Anatomy Of A Playbook: Plays, Tasks And Modules — RHCE in Ansible (EX294): Automate Red Hat Systems
- Git And VS Code: Clone, Commit, Push, And The Dev Container — RHCE in Ansible (EX294): Automate Red Hat Systems