mondoohq / installer

Linux, macOS and Windows Install scripts for cnquery & cnspec
https://install.mondoo.com
Other
86 stars 14 forks source link

Allow configuring of annotations during bootstrap #465

Open scottford-io opened 3 months ago

scottford-io commented 3 months ago

Is your feature request related to a problem? Please describe. The installer should support configuring of annotations during bootstrap so users can properly annotate their assets

Describe the solution you'd like

Add a new option -a to set key/val pairs separated by commas to add annotations to the mondoo.yml

while getopts 'i:s:u:vt:vr:y:' flag; do
  case "${flag}" in
    a) MONDOO_ANNOTATION="${OPTARG}" ;;
    i) MONDOO_INSTALLER="${OPTARG}" ;;
    s) MONDOO_SERVICE="${OPTARG}" ;;
    t) MONDOO_REGISTRATION_TOKEN="${OPTARG}" ;;
    u) MONDOO_AUTOUPDATER="${OPTARG}" ;;
    r) TIMER="${OPTARG}" ;;
    y) SPLAY="${OPTARG}" ;;
    *) print_usage
       exit 1 ;;
  esac
done
curl -sSL https://install.mondoo.com/sh | bash -s -- -u enable -s enable -t ${var.mondoo_registration_token} -a "<key>=<val>,<key>=<val>,<key>=<val>"

Describe alternatives you've considered

Additional context Add any other context or screenshots about the feature request here.

benr commented 1 month ago

This hasn't come up in a while reducing the priority but its still something that needs addressing.