Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with molecule-docker's ansible_connection #648

Closed
jrosdahl opened this issue Apr 11, 2022 · 0 comments · Fixed by #649
Closed

Incompatibility with molecule-docker's ansible_connection #648

jrosdahl opened this issue Apr 11, 2022 · 0 comments · Fixed by #649

Comments

@jrosdahl
Copy link
Contributor

ansible-community/molecule-docker#58 changed Molecule's Docker driver to set ansible_connection to community.docker.docker instead of docker. This value seems to not be handled by testinfra.utils.ansible_runner.AnsibleRunner.get_host since None is returned for a host in a Molecule test using the Docker driver.

Would it make sense to add special handling of ansible_collection == "community.docker.docker"?

jrosdahl added a commit to jrosdahl/pytest-testinfra that referenced this issue Apr 11, 2022
Molecule's Docker driver sets ansible_connection to
community.docker.docker, making
testinfra.utils.ansible_runner.AnsibleRunner.get_host fail to return
such a host in a Molecule test using the Docker driver.

Fix this by translating "community.docker.docker" to "docker".

Closes pytest-dev#648.
philpep pushed a commit that referenced this issue Apr 12, 2022
Molecule's Docker driver sets ansible_connection to
community.docker.docker, making
testinfra.utils.ansible_runner.AnsibleRunner.get_host fail to return
such a host in a Molecule test using the Docker driver.

Fix this by translating "community.docker.docker" to "docker".

Closes #648.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant