Interview Prep/Ansible/Roles, Collections and Galaxy

`[WARNING]: Ansible is being run in a world writable directory (/vagrant), ignoring it as an ansible.cfg source.`

IntermediateTroubleshootingRoles, Collections and Galaxy
Answer

Likely causes → The project folder is world-writable (Vagrant shared folders, WSL /mnt/c, a mounted volume in CI). For security, Ansible refuses to load ansible.cfg from it, so roles_path, inventory and other settings are silently lost.

Fix → Remove world-write permission (chmod o-w .), mount with proper permissions (for WSL, metadata mount options), or point to the file explicitly with export ANSIBLE_CONFIG=$PWD/ansible.cfg.

Prevent → Check ansible --version for the line config file = ... at the start of CI jobs.

All Ansible questions Roadmap: Ansible

More on Roles, Collections and Galaxy