To elaborate a bit on my use case, I'm trying to run integration tests on 
playbooks - that is, test the playbooks in various scenarios. For each 
test, I want to spin up a docker container (or several) and treat them as 
the hosts against which the playbook is being tested. And then I'd like to 
delete the docker containers.

Aside from the problem of parameterizing the creation of a "host", I'm 
wondering how to delete the containers if the test fails. There doesn't 
seem to be any way to recover from a playbook include failing. It has to be 
a playbook include because it's a playbook being tested, and I'd like to 
pass it the inventory that's been created. But then there's no way on a 
play include to add handlers or failed_when or register or any of the other 
goodies that are available for tasks. The only thing I could think of is to 
have something write out the inventory (how?) and feed it to a command task 
that runs the target playbook.

Or is this just a fundamental mismatch with the Ansible Way and I should be 
considering some other approach entirely?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d8abeae1-b343-4aca-b6ef-c7ba99cfd801%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to