Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for multiline yaml var #26387

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/Configuration/yaml-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ team_settings: # Only teams/team-name.yml

Currently, managing labels and users is only supported using Fleet's UI or [API](https://fleetdm.com/docs/rest-api/rest-api) (YAML coming soon).

#### Environment variables

Fleet supports adding [GitHub environment variables](https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow) in your YAML files. Use `$ENV_VARIABLE` format, for example:

```yaml
agent_options:
config:
options:
distributed_interval: $DISTRIBUTED_INTERVAL_SETTING
```

> Note that while using variables with multi-line values is also supported, it can be challenging to do correctly. Specifically, the value must be formatted such that when the variable is expanded, the indentation of each line is valid for its location in the YAML. If set incorrectly, you may receive errors like `failed to unmarshal file error converting YAML to JSON` when running your GitOps command.

## policies

Policies can be specified inline in your `default.yml`, `teams/team-name.yml`, or `teams/no-team.yml` files. They can also be specified in separate files in your `lib/` folder.
Expand Down
Loading