First off, I think the direction of eliminating drivers and just using ansible itself with collections to set up the “infrastructure” to test against is probably a good ting.
The downside is you’re now picking a tech/collection in your create.yml
, and there’s (currently?) no good way to pick a different tech/collection for a given scenario, which I think is rather unfortunate.
So now scenarios like deploy_app_with_apache
and deploy_app_with_nginx
have to become deploy_app_with_apache_using_docker
and if I want to provide testing for a different driver/backend it’d be deploy_app_with_apache_using_libvirt
.
Would it be reasonable to reuse --driver
(or just a new flag --backend
) to look for keys in the playbooks dict? (As is already done for drivers)
Something like;
provisioner:
name: ansible
playbooks:
docker:
create.yml: create-docker.yml
destroy.yml: destroy-docker.yml
libvirt:
create.yml: create-libvirt.yml
...