Compare commits
2 Commits
v0.10.0
...
5d21764ef1
Author | SHA1 | Date | |
---|---|---|---|
5d21764ef1 | |||
c7302f0e17 |
@ -6,16 +6,16 @@ description: This is dedicated to user commands.
|
||||
|
||||
This is dedicated to `user` commands. The command `type` field must be `user`. User is a type that allows one to perform user operations. There are several additional options available when `type` is `user`:
|
||||
|
||||
| name | notes | type | required |
|
||||
| --- | --- | --- | --- |
|
||||
| `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` | 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 |
|
||||
| name | notes | type | required | External directive support
|
||||
| ----------------| -------------------------------------------------------------| ---------- | ---------| --------------------------|
|
||||
| `userName` | The name of a user to be configured. | `string` | yes | no |
|
||||
| `userOperation` | The type of operation to perform. | `string` | yes | no |
|
||||
| `userID` | The user ID to use. | `string` | no | no |
|
||||
| `userGroups` | The groups the user should be added to. | `[]string` | no | no |
|
||||
| `userSshPubKeys`| The keys to add to the user's authorized keys. | `[]string` | no | yes |
|
||||
| `userShell` | The shell for the user. | `string` | no | no |
|
||||
| `userHome` | The user's home directory. | `string` | no | no |
|
||||
| `userPassword` | The new password value when using the `password` operation. | `string` | no | yes |
|
||||
|
||||
|
||||
#### example
|
||||
|
@ -248,6 +248,9 @@ func unmarshalConfig(k *koanf.Koanf, key string, target interface{}, log zerolog
|
||||
|
||||
func getCommandEnvironments(opts *ConfigOpts) {
|
||||
for cmdName, cmdConf := range opts.Cmds {
|
||||
if cmdConf.Env == "" {
|
||||
continue
|
||||
}
|
||||
opts.Logger.Debug().Str("env file", cmdConf.Env).Str("cmd", cmdName).Send()
|
||||
if err := testFile(cmdConf.Env); err != nil {
|
||||
logging.ExitWithMSG("Could not open file"+cmdConf.Env+": "+err.Error(), 1, &opts.Logger)
|
||||
|
Reference in New Issue
Block a user