arod
05/06/2021, 9:36 PMfleetctl
?
./*fleetctl* apply -f pack-file.yml
They are imported and show up on the fleet UI but they are commented out on the endpoints.Noah Talerman
05/06/2021, 9:51 PMfleetctl apply
command. The fleetctl apply
won’t write to this configuration file. Instead the command will update the packs present on your Fleet server.arod
05/10/2021, 3:25 PMNoah Talerman
05/10/2021, 8:36 PMarod
05/10/2021, 8:42 PMNoah Talerman
05/10/2021, 10:19 PMtargets
field in this file.
The targets
field allows you to specify the labels
field (All Hosts, macOS, or custom labels). With labels
specified, the hosts that become members of these labels, upon enrolling to Fleet, will automatically become targets of the given pack.
I’m currently working on a PR to the docs with this answer. Check out the query packs config for an example config with the labels
field: https://github.com/fleetdm/fleet/blob/58445ede82550cb574775a83ae4cf5433f325a7e/docs/1-Using-Fleet/2-fleetctl-CLI.md#query-packsarod
05/11/2021, 8:40 PMwindow-pack.yml
or linux-packs.yml
needs to have the following (All Hosts or "windows" || "darwin" || etc:
So once I import them, they will know that any agents that is new and is part of "windows", they will be assigned those packs.Noah Talerman
05/11/2021, 9:14 PMonce I import them, they will know that any agents that is new and is part of “windows”, they will be assigned those packsThat is correct. Another solution (that doesn’t use any yaml config files) is to add the labels as targets to the packs using the Fleet UI. In the Fleet UI, adding the “Windows” label as a target of a pack will also automatically add any new host that belongs to the “Windows” label as a target.
arod
05/12/2021, 12:28 AMNoah Talerman
05/12/2021, 3:53 PMsome labels are automatically assigned to agentsCorrect. Every Fleet install comes with “built-in” labels. These “built-in” labels are: • “macOS” (darwin hosts are automatically added as members of this label) • “Windows” (windows hosts …) • “CentOS” (centos hosts …) • “Ubuntu” (ubuntu hosts …) • “Red Hat” (Red hat hosts …) Let’s say a
macOS
host enrolls to Fleet. It will first automatically be assigned the macOS
label. Then, the host, because it’s assigned the macOS
label, will automatically become a target of all packs that have the macOS
label as a target.