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

--host-pattern option required even when specifying pytest.mark.ansible(host_pattern=...) starting with version 24.1.0 #404

Open
andy-maier opened this issue Nov 10, 2024 · 0 comments

Comments

@andy-maier
Copy link

andy-maier commented Nov 10, 2024

I have a pytest test function that uses pytest.mark.ansible to specify host_pattern. Up to pytest-ansible version 4.1.1, this was sufficient to have the host pattern specified.

Starting with pytest-ansible version 24.1.0 though, it is in addition required to specify the --host-pattern command line option on the pytest command, even when pytest.mark.ansible specifies host_pattern. If one does not provide this command line option, pytest fails with the following error:

ERROR: Missing required parameter --ansible-host-pattern/--host-pattern

I tracked this change in behavior down to commit 1518c54. That is the first commit that causes the above error message to be displayed when not using the --host-pattern command line option.

Looking at the change of that commit, I was not able to figure out how that could possibly have caused this change.

Can this please be changed again as it was before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant