Requirement: it is the job of the tests (and its roles and/or
framework)
to launch any containers and virtual machines ... and run actual tests
inside of them.
The use of ansible_connection=local is a way enshrining that
requirement. But if there's a better way to enshrine that requirement,
then lets do it. Perhaps one will come to mind?
I think Tim is asking from a different perspective.
In Taskotron, we'll have a VM host. On VM host we'll spawn a clean VM for each
executed test suite. In order to execute the test suite, I see two options:
a) run the playbook from VM host and point to the VM as the target system. So ansible
process will be started on the VM host, but the whole execution will happen in the VM.
b) connect to the VM (ssh, paramiko, or ansible) and then run the test suite in the VM as
a local ansible process with local connection. The easiest way of connecting to the VM is
for us most probably again to use ansible, so this will be ansible-in-ansible execution.
The spec currently mandates b) option. But in both options, the test suite is given an
empty machine, with nothing preinstalled/predefined, and it's completely on its own to
set up everything (as required by the spec). So from the test suite POV, both a) and b)
are equivalent. But from the test system POV, running it as a) is easier (no
ansible-in-ansible wrappers).
Please tell me if I'm missing something here. Why wouldn't we allow a) when it
doesn't affect test suite's self-reliance?
Thanks,
Kamil