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
Lookups in inventory are eagerly evaluated in 2.1.1.0, greatly impacting performance #17024
Comments
I'm having the same behavior with a task rebooting the servers after an update, like this :
Before, I had a single [skipping: ...] for each server, but with v2.1.1.0, each action in the reboot task is visible. |
6b286ee#diff-76ffc0551f8cf3d6255500316568e60bR412
This line causes the change of behavior. Any comment from @nitzmahone on whether this was intended? |
When using hostvars to get extra connection-specific vars for connection plugins, use this raw lookup to avoid prematurely templating all of the hostvar data (triggering unnecessary lookups). Fixes #17024
When using hostvars to get extra connection-specific vars for connection plugins, use this raw lookup to avoid prematurely templating all of the hostvar data (triggering unnecessary lookups). Fixes #17024 (cherry picked from commit ac5ddf4aa092e12f9e1c85c6b74aa30b7ef0a382)
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will be included in the 2.2.0 and 2.1.2 releases. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
When using hostvars to get extra connection-specific vars for connection plugins, use this raw lookup to avoid prematurely templating all of the hostvar data (triggering unnecessary lookups). Fixes ansible#17024
ISSUE TYPE
COMPONENT NAME
Lookup Plugin
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
The timing of when lookups defined in an inventory are resolved has changed between 2.1.0.0 and 2.1.1.0. In 2.1.0.0, the lookups are not resolved until they are used. In 2.1.1.0, the lookups are eagerly resolved.
STEPS TO REPRODUCE
./ansible_2.1.0.0.sh
./ansible_2.1.1.0.sh
EXPECTED RESULTS
Lookups are evaluated lazily.
ACTUAL RESULTS
Lookups are evaluated eagerly
The text was updated successfully, but these errors were encountered: