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

ansible plugin downloads playbook to the plan directory, not workdir #3237

Open
lukaszachy opened this issue Sep 25, 2024 · 1 comment
Open
Labels
bug Something isn't working plugin | ansible The ansible plugins

Comments

@lukaszachy
Copy link
Collaborator

I use plan like https://github.com/lukaszachy/testing-farm-konflux/blob/main/examples/tmt-plan/konflux.fmf
and once ti finishes I always have files like playbook-la0vgbpg.yml in the directory with the plan (fmf root as well as git root).

tmt version: 1.37.dev26+g1238dcaa

The command line used is tmt -c trigger=commit -c initiator=konflux run -avvv --environment-file envfile.yaml report -h html -o login -w error -w fail

IMO tmt should refrain from modifying plan directory (or any input files/directories).

@lukaszachy lukaszachy added bug Something isn't working plugin | ansible The ansible plugins labels Sep 25, 2024
@happz
Copy link
Collaborator

happz commented Sep 25, 2024

That was a price for the "all playbooks must be under fmf tree root" rule which has been relaxed a bit recently. I suppose prepare/ansible should use its workdir, correct? Root selection (https://github.com/teemtee/tmt/blob/main/tmt/steps/prepare/ansible.py#L171) is correct for file-backed playbooks, for the downloaded different root will be needed, but that's easy to achieve, set root_path before the if branch and set it to workdir for remote playbooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin | ansible The ansible plugins
Projects
None yet
Development

No branches or pull requests

2 participants