Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure we're targeting the right VMs
If a user has multiple deployments, they therefore have mutliple blocks in their `~/.ssh/config`. While the ssh configuration allows to chose the right VM using the hypervisor name (for instance controller-0.builder2), the dynamic inventory built using `ansible.builtin.add_host` doesn't target the specific host. With `delegate_to`, it may happen ansible connects to a wrong VM from a previous deployment that's still running, and the user will face some really weird situations - for instance, facts being wrongs (this hit the networking_mapper and the fetched MAC addresses). With this patch, we now have specific host targeting, and we also get it in the logs, for example: ``` changed: [builder2 -> controller-0(controller-0.builder2)] ```
- Loading branch information