Interview Prep/Ansible/Roles, Collections and Project Structure

Your project needs a standard layout. What do you show a new hire?

BeginnerScenarioRoles, Collections and Project Structure
Answer

Situation read → Project structure.

What I'd do →

ansible.cfg
requirements.yml
site.yml
inventories/{staging,prod}/{hosts,group_vars/,host_vars/}
playbooks/
roles/
collections/
molecule/           # per role

Why → Predictable placement means anyone can find variables and roles quickly.

Interview tip → Mention one repo, one ansible.cfg checked in, and .gitignore for vault password files.

All Ansible questions Roadmap: Ansible

More on Roles, Collections and Project Structure