Interview Prep/Ansible/Roles, Collections and Galaxy

A role fix is merged, but `ansible-galaxy role install -r requirements.yml` keeps running the old code

BeginnerTroubleshootingRoles, Collections and Galaxy
Answer

Likely causes → The role is already installed, and ansible-galaxy skips it with - nginx is already installed, skipping. unless the version changed or you force the install. Pinning a moving branch makes this worse.

Fix → Bump the version: to the new tag, or run ansible-galaxy role install -r requirements.yml --force.

Prevent → Pin roles to immutable tags or commits. In CI, install into a clean directory on every run.

All Ansible questions Roadmap: Ansible

More on Roles, Collections and Galaxy