Script that takes either a text file or .csv containing a list of teams as input and adds the teams to Fleet then generates installers. --------- Co-authored-by: Zach Wasserman <zach@fleetdm.com>
1.8 KiB
Fleet Team Builder
Using a list of teams in a file as input, adds the listed teams to Fleet and generates installer processes.
For each team, an enroll secret will be created, the team added to Fleet using the team yaml template, and .msi
,.deb
, .pkg
and .rpm
installer packages will be created.
Requirements
fleetctl Docker (for generating Windows installers)
Flags
Required flags:
- -s: The source file containing teams to be added.
- -u: The url of the Fleet server.
Optional flags:
- -p: packages - Default: "all" - The types of installer packages to create for each team.
- -f: flags - Additional flags to apply to
fleetctl package
. - -o: output - Default: Current location - Directory in which to place the generated packages.
- -x: dry_run - Test prossesing the file, creating the team in Fleet, and generating packages without applying any changes to the server.
Usage
-
Install and log in to fleetctl
-
Install and start Docker
-
Create a file including a list of teams, one per line:
Workstation
Canary
Servers
- Run the script and pass the Fleet Server URL and source file as arguments:
$ ./build_teams.sh -s teams.txt -u fleet.org.com
Team configuration
The teams generated with this script will use your global agent options. You can apply team settings after the team has been created.
Testing
To test team creation and package generation without applying the changes to Fleet, include the -x
flag. This will add the --dry_run
flag to fleetctl apply
. All actions will be taken, but the generated team configuration YAML will be validated without creating the new team.