Disable anonymous analytics collection for fleetctl preview (#2372)

* Disable anonymous analytics collection for fleetctl preview

* Force run checks
This commit is contained in:
Martin Angers 2021-10-07 08:01:51 -04:00 committed by GitHub
parent 876aa0e366
commit e4dae5f3d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1 @@
* Disable anonymous analytics collection for `fleetctl preview`.

View file

@ -207,6 +207,13 @@ Use the stop and reset subcommands to manage the server and dependencies once st
return errors.New("Expected 1 active enroll secret")
}
// disable anonymous analytics collection for preview
if err := client.ApplyAppConfig(map[string]map[string]bool{
"server_settings": {"enable_analytics": false}},
); err != nil {
return errors.Wrap(err, "Error disabling anonymous analytics collection in app config")
}
fmt.Println("Starting simulated hosts...")
cmd = exec.Command("docker-compose", "up", "-d", "--remove-orphans")
cmd.Dir = filepath.Join(previewDir, "osquery")