Skip to content

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.yml and vars/main.yml? — see Role Structure
  • How do role dependencies in meta/main.yml work, 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.yml declare, and why does it matter for dependency resolution? — see Collection Structure
  • Why should collection versions be pinned in requirements.yml rather 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_spec relate to both input validation and ansible-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.