-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix unused hostvars array when grouping hosts #7
Conversation
@Termina1 Thanks for submitting this. If I recall correctly, appending to Would you be able to update the test files to confirm this behaviour and to help prevent regression in the future? |
Sometimes it can be counter-intuitive, but it's not the same effect. After appending to slice, you must assign result to a variable, otherwise it won't take effect. |
@Termina1 Right, thank you! Though would you still be able to add one or more test cases to this PR to ensure it's accounted for? |
I would have to fix the tests first, because they don’t work on OSX I can give you tfstate which produces invalid unexpected inventory |
I've been able to get the tests running on OS X and have written a test case for this. I'm going to merge this and follow-up with an additional PR for the tests. |
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.
LGTM - thank you!
@Termina1 v0.3.1 has been released with this fix: https://github.com/jtopjian/ansible-terraform-inventory/releases/tag/v0.3.1 Please let me know if you have any issues with it. |
Cool, thanks! |
Currently if there is no group defined explicitly and they are defined when checking hosts, there always will be only one host in each group