-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat(install_utilities): send list to package module #138
Conversation
Instead of looping through the list it is recommended to send a list to apt/yum when install multiple packages. *When used with a `loop:` each package will be processed individually, it is much more efficient to pass the list directly to the name option.*
Thanks for the PR. Sorry I was out for a bit, so I wasn't able to have a look at it. This is a goo suggestion, but the reason it loops it because if a certain package does not exist, the whole operation will fail, and it will not install any packages at all. This has been suggested before, but the packages should be split out by platform and version. For example, policycoreutils-python is RHEL only. Any suggestions? |
Okay to that explains the I can come up with 2 idea.
|
Thoughts? |
@zyphermonkey I think that's the way to do it. The only problem is that some OS versions differ as well, and then you'll need to have separate vars for |
vars are needed in various task files best to include them early to ensure they're always available
tested on |
@zyphermonkey Thanks for the PR. At first glance, it looks good, and the includes being in I will try to test it on some more platforms and scenarios sometime this week. |
3726a1c
to
37503aa
Compare
|
Instead of looping through the list it is recommended to send a list to apt/yum when install multiple packages.
When used with a
loop:
each package will be processed individually, it is much more efficient to pass the list directly to the name option. https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html