Skip to content
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: Improve apt facts install #354

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: Improve apt facts install #354

wants to merge 1 commit into from

Conversation

SuperQ
Copy link
Contributor

@SuperQ SuperQ commented Apr 27, 2024

Reduce the number of packages installed by the apt package facts preflight by using the apt module and disabling recommends packages.

Copy link
Member

@gardar gardar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to switch the task over to apt as the package module is actually just a proxy for apt or whatever package manager is present.

With that being said, the way the task is configured right now it actually never runs on any non apt systems.
I think we should make sure the task also installs the required dependencies for other distros, even though we don't run tests against them. it looks like suse requires python3-rpm and gentoo needs qlist.

@SuperQ
Copy link
Contributor Author

SuperQ commented Jun 11, 2024

Except we do need to switch to apt, since package doesn't expose "install_recommends" as a parameter.

@gardar
Copy link
Member

gardar commented Jun 11, 2024

That is true but it simply passes the parameters down to the underlying module that it's proxy-ing.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html#id1

Reduce the number of packages installed by the apt package facts
preflight by using the apt module and disabling recommends packages.

Signed-off-by: SuperQ <[email protected]>
Copy link
Member

@gardar gardar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to only pass the install_recommends parameter if ansible_pkg_mgr is apt else omit it to avoid future issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment