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

tox-ansible should not dig for scenario among untracked files #77

Open
ssbarnea opened this issue Mar 25, 2021 · 2 comments
Open

tox-ansible should not dig for scenario among untracked files #77

ssbarnea opened this issue Mar 25, 2021 · 2 comments
Labels
bug This issue/PR relates to a bug.

Comments

@ssbarnea
Copy link
Member

I recently come to a bug where I realised that scenarios from other repositories which where cloned during testing endup being detected by tox-ansible.

I think that the only safe way to assure we do not dig too much is to rely on git ls-files output instead of using globbing.

@greg-hellings What do you think?

@ssbarnea ssbarnea added the bug This issue/PR relates to a bug. label Mar 25, 2021
@greg-hellings
Copy link
Contributor

Hmm, I would rather not depend on a particular development tool to be present, such as git.

I would prefer some sort of path exclusion option in the tox.ini [ansible] section. That way you could prune out certain paths like .tox, .cache, etc. Those two would be a reasonable set of defaults, since we know that both would be created by associated tools, but their absence wouldn't depend on a particular tool being present the way git ls-files would.

Would that be manageable?

@greg-hellings
Copy link
Contributor

Actually, looking through the code, it already supports the option

[ansible]
ignore_path =
    foo
    bar/baz

Obviously if that's not feature-rich enough or needs to be improved we can do it. But that should suffice for the needs. As I said, I would rather not rely on git at all, and certainly not on tracked files as I will often use tox-ansible to run against a new role that hasn't been added yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants