Interview Prep: Roles, Collections & Modules¶
Section status: outline
This page lists the questions with concise answers; the full leveled treatment (misconceptions, senior follow-ups) will be filled in alongside the other interview pages.
Roles¶
- What is the standard directory structure of an Ansible role? — see Role Structure
- What's the practical difference between
defaults/main.ymlandvars/main.yml? — see Role Structure - How do role dependencies in
meta/main.ymlwork, and what's the risk if not guarded correctly? — see Role Structure - Why namespace role variables instead of using short, generic names? — see Role Variables and Interfaces
Collections¶
- What's the difference between a role and a collection? — see Collections
- What does
galaxy.ymldeclare, and why does it matter for dependency resolution? — see Collection Structure - Why should collection versions be pinned in
requirements.ymlrather than installed ad hoc? — see Installing and Using Collections
Custom Modules¶
- What does a module have to do to correctly support check mode — not just declare it? — see Build a Custom Module
- How does
argument_specrelate to both input validation andansible-doc's generated documentation? — see Build a Custom Module - What changes — and what doesn't — when a standalone
library/module gets moved into a collection? — see Build a Collection From Zero
Next¶
Continue to Senior & Architect Questions.