fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.15k stars 432 forks source link

Support inline queries for software GitOps #20750

Open spokanemac opened 3 months ago

spokanemac commented 3 months ago

Problem

I would like to include an inline query for the pre_install_query

   - url: https://zoom.us/client/latest/Zoom.pkg?archType=arm64
      pre_install_query: SELECT 1 FROM system_info WHERE cpu_type = "arm64e";
      self_service: true

This currently requires a path, breaking with functionality for other GitOps.

    - url: https://zoom.us/client/latest/Zoom.pkg
      pre_install_query: 
        path: ../lib/macos-intel.queries.yml
      self_service: true

What have you tried?

Inserting the query inline results in a failed GitOps dry run.

Potential solutions

Support inline queries.

What is the expected workflow as a result of your proposal?

Reduces the need to introduce a query file to be referenced for a single software title.

noahtalerman commented 3 months ago

Thanks for tracking this @spokanemac!

Reduces the need to introduce a query file to be referenced for a single software title.

This pain makes sense.