12 KiB
12 KiB
Table of Contents
Export configuration to environment variables
Note
Exporting the configuration as an environment variable makes it available to applications that require this type of variable (scripts, Twelve-Factor Apps, etc.).
You can use it, with the appropriate .rougailconf.yaml file, by doing: "source <(rougail)".
Note: A variable within a "sequence" that is disabled for a specific index will be replaced by an empty string.
Path: environment
disabled
Disabled: when the variable "select for output" is accessible and hasn't the value "environment".
Configuration for output environment
Note
Path: environment.output
disabled
Disabled: when the variable "select for output" is accessible and hasn't the value "environment".
| Variable | Description | Default value | Type | Access control | Validator |
|---|---|---|---|---|---|
| environment.output.prefix Command line: --environment.output.prefix Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.PREFIX |
Add prefix to environment variables. | string |
|||
| environment.output.boolean_type Command line: --environment.output.boolean_type Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.BOOLEAN_TYPE |
Booleans are converted into. There is no boolean in shell, so we have to convert it "string" means the string "true" or "false" "number" means the number "1" or "0". |
string | choice mandatory |
Choices: • string • number |
|
| environment.output.upper Command line: • --environment.output.upper • --environment.output.no-upper Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.UPPER |
Variables name are upper. | true | boolean mandatory |
||
| environment.output.path_is_variable_name Command line: • --environment.output.path_is_variable_name • --environment.output.no-path_is_variable_name Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.PATH_IS_VARIABLE_NAME |
The variables name is, in fact, the path. | true | boolean mandatory |
||
| environment.output.custom_separator Command line: --environment.output.custom_separator Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.CUSTOM_SEPARATOR |
Replace the separator character "." in path by an other. The character dot (".") may not be allowed in the environment variable name. |
_ | string |
disabledDisabled: when the variable "The variables name is, in fact, the path" has the value "false". |
|
| environment.output.multi_in_array Command line: • --environment.output.multi_in_array • --environment.output.no-multi_in_array Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.MULTI_IN_ARRAY |
Multiple values variable will be loaded in a array. Not all shells support arrays. This feature is not POSIX-compatible, it's a Bash-specific feature (other shells like zsh or ksh also support arrays). If your shell supports arrays, it is preferable to use them to iterate over the values in the list. |
true | boolean mandatory |
||
| environment.output.multi_separator Command line: --environment.output.multi_separator Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.MULTI_SEPARATOR |
The separator for multiple values variable. | ; | string mandatory |
disabledDisabled: when the variable "Multiple values variable will be loaded in a array" has the value "true". |
|
| environment.output.submulti_separator Command line: --environment.output.submulti_separator Environment variable: ROUGAILCLI_ENVIRONMENT.OUTPUT.SUBMULTI_SEPARATOR |
The separator for sub multiple values variable. | if "Multiple values variable will be loaded in a array" the value is ";" otherwise the value is ",". | string mandatory |