Interview Prep/Ansible/Roles, Collections and Project Structure

Migrating a legacy pre-2.10 playbook that uses short module names to modern Ansible.

IntermediateScenarioRoles, Collections and Project Structure
Answer

Situation read → Short names such as yum: or ec2: break or are ambiguous.

What I'd do →

  1. Run ansible-lint and let it flag fqcn.
  2. Use ansible-lint --fix for mechanical changes.
  3. Install the collections they now live in (amazon.aws, community.general).
  4. Replace removed modules (ec2 becomes ec2_instance).

Why → FQCNs make the source of every module explicit.

Interview tip → Core builtins are ansible.builtin.*.

All Ansible questions Roadmap: Ansible

More on Roles, Collections and Project Structure