1.9 KiB
Variables File
A variables file contains variable definitions that may be used as the context for parsing a steps file before the actual commands are generated.
Unlike a steps file, the INI format is currently the only supported format for a variables file.
The Variable Name
The variable name is defined in the section:
[domain_name]
value: example.com
The Variable Value
As seen in the example above, the value is defined by simply adding a variable parameter:
[domain_name]
value: example.com
[database_host]
value: db1.example.com
!!! note
This is the minimum definition for all variables.
Defining An Environment
You may define an environment for any given variable that may be used for filtering variables. This is done by adding the environment name to the variable name:
[database_host:development]
value: localhost
[database_host:live]
value: db1.example.com
In this way, variables of the same name may be supported across different deployment environments.
Adding Comments
As demonstrated in the example above, you may comment on a variable by adding a comment:
attribute to the section.
[database_host:testing]
comment: Local host used when testing.
value: localhost
[database_host:live]
comment: Separate server used when live.
value: db1.example.com
Defining Tags
Tags may be defined for any variable as a comma separated list. This is useful for filtering.
[database_host:development]
value: localhost
tags: database
[database_host:live]
value: db1.example.com
tags: database
[domain_name]
value: example.app
tags: application
Other Attributes
Any other variable defined in the section is dynamically available. These are not used by Script Tease, but implementers may find this feature useful.
[domain_name]
value: example.app
other: test
The value of other
is test
.