UtrechtUniversity / researchcloud-items

Installation scripts for SURF ResearchCloud catalog components
https://utrechtuniversity.github.io/researchcloud-items/
GNU General Public License v3.0
7 stars 4 forks source link

Role fact_workspace_info: refactor desktop fact? #147

Open dometto opened 3 months ago

dometto commented 3 months ago

The fact_workspace_info role currently uses a call to the package_facts module to determine installed packages on the system, in order to then determine if the workspace has a desktop environment.

packages_facts allows us to check for packages on the system with something like 'bla' in ansible_facts.packages. This is cleaner and more generic than using the command module to check for an installed package and registering the result, but it also looks significantly slower (on a podman container it takes about 3-5 seconds). Not terribly long, but if it's repeated for a number of components it might add up to have a minute deploy time just to check for package installations.

On the other hand, it could be efficient if many packages need to be checked.

Need to determine whether to keep things as is, or refactor with a command call.