Use Ansible Collections Directly from Source During Development
I've recently been working on writing an Ansible collection from scratch. The collection ships everything in a single repo – the collection itself, example playbooks, roles, and supporting content. As it matured I started running it through Ansible Automation Platform (AAP) alongside local development, and that's when a friction point I hadn't anticipated started to slow me down.
I'd been using a Makefile to build and install the collection locally before testing it. Every change - a tweak to a module, an update to a role - meant stopping, rebuilding, reinstalling, then running the playbook. It was interrupting the flow constantly. But I couldn't just rip that out, because I also needed AAP to be able to pull the collection directly from the repo without a manual build step. I needed a setup that worked for both, without breaking either.
When you use AAP with a project repo that also contains the collection you're developing, you end up with a constraint that makes local development awkward. This post explains the problem and how to solve it.