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
Package module does not provide with_items optimisation same as yum #24581
Comments
This is the expected behavior. Under the hood the To enable squashing of the http://docs.ansible.com/ansible/intro_configuration.html#squash-actions If you have further questions please stop by IRC or the mailing list:
|
I would vote for enable squashing by default for If one package module is not supporting it is this module bug and normal users should not pay the huge price for that. |
We have the intentions on removing squashing altogether from ansible, in favor of just using a list directly. e.g:
|
@sivel Can you please add more info about this "idea". What would be the behaviour: installing all of them as a single transaction of with multiple calls to the package manager for each package? If it would be using multiple steps it could easily translate to huge executions times and annoying lots of people about ansible taking ages to run. The speed differences are not to be ignored at least with yum where with only 10-20 packages, it can easily mean >20mins extra time to run. Disabling the installation of packages in a single transaction would be a disaster from the performance point of view. |
squashing takes the following:
And turns it into:
Both of the above are equivalent, and only uses a "single transaction". Squashing is not portable, and requires a hard coded list of modules that support squashing, we have plans to remove it. There is really no reason to do it, since modules support this functionality natively, by passing a list to |
ISSUE TYPE
COMPONENT NAME
Generic package module
ANSIBLE VERSION
SUMMARY
According to documentation,
One would expect that the generic
package
module provides the same optimization forwith_items
. But it seems not to be the case. Not onlywith_items
works slower (if compared to equivalent task usingyum
module), it also results in failures in some edge cases where order of installing packages without optimization would be important.STEPS TO REPRODUCE
The following works fine with
yum
but fails withpackage
:EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: