NETWAYS / ansible-collection-elasticstack

A collection to install and manage the Elastic Stack
GNU General Public License v3.0
9 stars 8 forks source link

Update Debian apt cache when packages are not installed #167

Closed widhalmt closed 10 months ago

widhalmt commented 1 year ago

I'm not as used to Debian as I'm used to RedHat, so take this with a grain of salt: Should we update apt cache before installing the packages? There are similar tasks in out Molecule checks but not in the actual roles.

In https://github.com/geerlingguy/ansible-role-mysql @geerlingguy has a task that checks whether the package is already installed. And if not, then her refreshes the apt cache. Should speed up the process significantly.

afeefghannam89 commented 1 year ago

We should update the cache if we want to install an actual package or update an existed one. Debian does not know about the new available packages without cache update. We can also integrate the cache update in the installation task.

widhalmt commented 1 year ago

Yes. How about opening an issue or even a project/milestone for updating? And for now we check whether it's installed and if not, we run the cache update? Would that be ok? We need to keep the update in the Molecule configuration because that's for a different set of packages.

afeefghannam89 commented 1 year ago

ok, I agree with you