-
-
Notifications
You must be signed in to change notification settings - Fork 362
Various ansible fixes #112
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
Conversation
**kwargs).run() | ||
inventory=self.inventory, | ||
**kwargs) | ||
result = runner.run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneeded change
fwiw (I know this is WIP), I tested this branch to see if it would solve the problem with the vault and now all my tests are skipped:
Reverting to 1.3.1, the tests are not skipped anymore (but blow up with |
@rabadin thanks for testing! I think I've broken the |
I'm not sure if this belongs here, but I have found testinfra loads variables differently. Here is my test. Where
Failure is:
|
|
With ansible 2, ansible.cfg wasn't parsed anymore... Code inspired by ansible.cli.playbook
@retr0h @rabadin updated the patchset. Now most of ansible objects are created once per backend (instead of once per command run) and I fixed a bug in ansible v2 where It would be great if that fix (at least some of) your issues. |
I should note, I am using ansible 1.9 stable. |
I still see it gathering facts per host. I have 3 hosts that make up
|
Just tested with f69c802 and I still see all the tests being skipped with the |
@rabadin your issue looks weird, and I wouldn't break something while merging this PR. Could you tell me more about your setup and how testinfra is run etc ? |
@retr0h about:
Your variable name is |
I'll double check. However, I am looking forward to these performance fixes ;) Could use them. |
Hi @philpep, my setup is not easy to reproduce (it includes an openstack cloud) but I've managed to reproduce the "tests being skipped" problem with a vagrant machine. I /think/ the problem comes from using a dynamic inventory (passed to --ansible-inventory). I've seen the tests being skipped using this file: https://gist.github.com/rabadin/cb05f8c39317df23d5f9adb08eaab4f8 (this is a dynamic inventory which contains only my vagrant host -it's obviously dumb but it's only to test with a dynamic inventory). |
Note that when I use a static inventory in lieu of my dynamic one (https://gist.github.com/rabadin/a390ebba907de6268dab5a1ee1558248), and with the correct |
After additional investigation I think the problem comes from my dynamic inventory script: the hosts in there were not part of any group and this caused the tests being "skipped". If I add a group with my dynamic hosts (in the dynamic inventory) then it works. |
Confirmed: I've done the same test in my openstack config with this pr and when I modify the dynamic inventory script as described above everything works. |
Awesome, looking forward to this release due to the performance improvements detailed in #56. |
Merged. I'll release a new version soon. |
Released in 1.4.0 |
No description provided.