added external directives to Notifications, change case of keys in host, and update docs
This commit is contained in:
@ -12,17 +12,17 @@ weight: 1
|
||||
|
||||
Values available for this section **(case-sensitive)**:
|
||||
|
||||
| name | notes | type | required
|
||||
| --- | --- | --- | --- |
|
||||
| `cmd` | Defines the command to execute | `string` | yes |
|
||||
| `Args` | Defines the arguments to the command | `[]string` | no |
|
||||
| `environment` | Defines environment variables for the command | `[]string` | no |
|
||||
| `type` | See documentation further down the page. Additional fields may be required. | `string` | no |
|
||||
| `getOutput` | Command(s) output is in the notification(s) | `bool` | no |
|
||||
| `host` | If not specified, the command will execute locally. | `string` | no |
|
||||
| `scriptEnvFile` | When type is `scriptFile` or `script`, this file is prepended to the input. | `string` | no |
|
||||
| `shell` | Run the command in the shell | `string` | no |
|
||||
| `hooks` | Hooks are used at the end of the individual command. Must have at least `error`, `success`, or `final`. | `map[string][]string` | no |
|
||||
| name | notes | type | required | External directive support |
|
||||
| ----------------| ------------------------------------------------------------------------------------------------------- | --------------------- | -------- |----------------------------|
|
||||
| `cmd` | Defines the command to execute | `string` | yes | No |
|
||||
| `Args` | Defines the arguments to the command | `[]string` | no | No |
|
||||
| `environment` | Defines environment variables for the command | `[]string` | no | No |
|
||||
| `type` | See documentation further down the page. Additional fields may be required. | `string` | no | No |
|
||||
| `getOutput` | Command(s) output is in the notification(s) | `bool` | no | No |
|
||||
| `host` | If not specified, the command will execute locally. | `string` | no | No |
|
||||
| `scriptEnvFile` | When type is `scriptFile` or `script`, this file is prepended to the input. | `string` | no | No |
|
||||
| `shell` | Run the command in the shell | `string` | no | No |
|
||||
| `hooks` | Hooks are used at the end of the individual command. Must have at least `error`, `success`, or `final`. | `map[string][]string` | no | No |
|
||||
|
||||
#### cmd
|
||||
|
||||
|
@ -10,10 +10,12 @@ This is dedicated to `user` commands. The command `type` field must be `user`. U
|
||||
| --- | --- | --- | --- |
|
||||
| `userName` | The name of a user to be configured. | `string` | yes |
|
||||
| `userOperation` | The type of operation to perform. | `string` | yes |
|
||||
| `userID` | The user ID to use. | `string` | yes |
|
||||
| `userGroups` | The groups the user should be added to. | `[]string` | yes |
|
||||
| `userShell` | The shell for the user. | `string` | yes |
|
||||
| `userID` | The user ID to use. | `string` | no |
|
||||
| `userGroups` | The groups the user should be added to. | `[]string` | no |
|
||||
| `userSshPubKeys` | The keys to add to the user's authorized keys. | `[]string` | no |
|
||||
| `userShell` | The shell for the user. | `string` | no |
|
||||
| `userHome` | The user's home directory. | `string` | no |
|
||||
| `userPassword` | The new password value when using the `password` operation. Can be specified by using external directive. | `string` | no |
|
||||
|
||||
|
||||
#### example
|
||||
|
15
docs/content/config/directives.md
Normal file
15
docs/content/config/directives.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "External Directives"
|
||||
weight: 2
|
||||
description: How to set up external directives.
|
||||
---
|
||||
|
||||
External directives are for including data that should not be in the config file. The following directives are supported:
|
||||
|
||||
- `%{file:path/to/file}%`
|
||||
- `%{env:ENV_VAR}%`
|
||||
- `%{vault:vault-key}%`
|
||||
|
||||
See the docs of each command if the field is supported.
|
||||
|
||||
If the file path does not begin with a `/`, the config file's directory will be used as the starting point.
|
@ -5,19 +5,19 @@ description: >
|
||||
This page tells you how to use hosts.
|
||||
---
|
||||
|
||||
| Key | Description | Type | Required |
|
||||
|----------------------|---------------------------------------------------------------|----------|----------|
|
||||
| `OS` | Operating system of the host (used for package commands) | `string` | no |
|
||||
| `config` | Path to the SSH config file | `string` | no |
|
||||
| `host` | Specifies the `Host` ssh_config(5) directive | `string` | yes |
|
||||
| `hostname` | Hostname of the host | `string` | no |
|
||||
| `knownhostsfile` | Path to the known hosts file | `string` | no |
|
||||
| `port` | Port number to connect to | `uint16` | no |
|
||||
| `proxyjump` | Proxy jump hosts, comma-separated | `string` | no |
|
||||
| `password` | Password for SSH authentication | `string` | no |
|
||||
| `privatekeypath` | Path to the private key file | `string` | no |
|
||||
| `privatekeypassword` | Password for the private key file | `string` | no |
|
||||
| `user` | Username for SSH authentication | `string` | no |
|
||||
| Key | Description | Type | Required | External directive support |
|
||||
|----------------------|---------------------------------------------------------------|----------|----------|----------------------------|
|
||||
| `OS` | Operating system of the host (used for package commands) | `string` | no | No |
|
||||
| `config` | Path to the SSH config file | `string` | no | No |
|
||||
| `host` | Specifies the `Host` ssh_config(5) directive | `string` | yes | No |
|
||||
| `hostname` | Hostname of the host | `string` | no | No |
|
||||
| `knownHostsFile` | Path to the known hosts file | `string` | no | No |
|
||||
| `port` | Port number to connect to | `uint16` | no | No |
|
||||
| `proxyjump` | Proxy jump hosts, comma-separated | `string` | no | No |
|
||||
| `password` | Password for SSH authentication | `string` | no | No |
|
||||
| `privateKeyPath` | Path to the private key file | `string` | no | No |
|
||||
| `privateKeyPassword` | Password for the private key file | `string` | no | Yes |
|
||||
| `user` | Username for SSH authentication | `string` | no | No |
|
||||
|
||||
## exec host subcommand
|
||||
|
||||
|
@ -39,23 +39,23 @@ There must be a section with an id (eg. `mail.test-svr`) following one of these
|
||||
|
||||
### mail
|
||||
|
||||
| key | description | type
|
||||
| --- | --- | ---
|
||||
| `host` | Specifies the SMTP host to connect to | `string`
|
||||
| `port` | Specifies the SMTP port | `uint16`
|
||||
| `senderaddress` | Address from which to send mail | `string`
|
||||
| `to` | Recipients to send emails to | `[]string`
|
||||
| `username` | SMTP username | `string`
|
||||
| `password` | SMTP password | `string`
|
||||
| key | description | type | External directive support |
|
||||
| --- | --- | --- | --- |
|
||||
| `host` | Specifies the SMTP host to connect to | `string` | no
|
||||
| `port` | Specifies the SMTP port | `uint16` | no
|
||||
| `senderaddress` | Address from which to send mail | `string` | no
|
||||
| `to` | Recipients to send emails to | `[]string` | no
|
||||
| `username` | SMTP username | `string` | no
|
||||
| `password` | SMTP password | `string` | yes
|
||||
|
||||
### matrix
|
||||
|
||||
| key | description | type
|
||||
| --- | --- | ---
|
||||
| `home-server` | Specifies the Matrix server connect to | `string`
|
||||
| `room-id` | Specifies the room ID of the room to send messages to | `string`
|
||||
| `access-token` | Matrix access token | `string`
|
||||
| `user-id` | Matrix user ID | `string`
|
||||
| key | description | type | External directive support |
|
||||
| --- | --- | ---| ---- |
|
||||
| `home-server` | Specifies the Matrix server connect to | `string` | no
|
||||
| `room-id` | Specifies the room ID of the room to send messages to | `string` | no
|
||||
| `access-token` | Matrix access token | `string` | yes
|
||||
| `user-id` | Matrix user ID | `string` | no
|
||||
|
||||
To get your access token (assumes you are using [Element](https://element.io/)) :
|
||||
|
||||
|
Reference in New Issue
Block a user