Ansible tests with the default inventory try to connect to localhost through SSH
Summary
When you run ansible-playbook
in your test and use the default inventory file, Ansible tries to connect to localhost through SSH, and fails.
Steps to reproduce
In your test, call:
ansible-playbook --inventory-file inventory my-test-playbook.yml
Expected behavior
Test tests.
Actual behavior
Test does not test (because it tries to connect to localhost through SSH).
Possible fixes
ansible_connection: "local"
Just see the service role for reference.