document how to add a dropin file with Hiera

This commit is contained in:
2024-01-19 14:06:25 +01:00
parent ddb7a11a07
commit 9dd47bfb20

View File

@@ -13,6 +13,31 @@ base::services:
```
The key inside is the `systemd` service name without the `.service` suffix.
## Extend/Override Unit File Entries with a Dropin
You can create a dropin file by setting `dropin` to `true` and add the content of the dropin unit file below the `options` key, as in following examples:
```
base::services:
netdata:
enable: true
dropin: true
options:
Service:
Environment: "FOO=bar"
```
or if there is more than one value for the same key:
```
base::services:
netdata:
enable: true
dropin: true
options:
Service:
Environment:
- "FOO=bar"
- "BIZ=buz"
```
## Disabling/Stopping a Service
To stop and disable an already running service, disable it in the `base::services` Hiera key with `enable: false`: