- Arguments that should be treated as a single value should be enclosed in double quotes.
-`yes` and `no` are interpreted as boolean values. `maybe` is interpreted as `None`.
- List values, where required, are separated by commas when appearing in INI files, but are a `[standard, list, of, values]` in a YAML file.
## Additional Attributes
Additional variables in the section are generally optional parameters that inform or control how the command should be executed and are sometimes used to add switches to the statement.
!!! warning
This is not always the case, so consult the documentation for the command in question, because some parameters that appear after the first line are actually required.
## Common Attributes
A number of common options are recognized. Some of these have no bearing on statement generation but may be used for filtering. Others may be optionally included, and a few may only be used programmatically.
### cd
The `cd` option sets the directory (path) from which the statement should be executed. It is included by default when the statement is generated, but may be suppressed using `cd=False`.
The comment comes from the section name (INI) or list name (YAML). It is included by default when the statement is generated, but may be suppressed using `include_comment=False`.
The `env` option indicates the target environment (or environments) in which the statement should run. This is not used in command generation, but may be used for filtering.
```yaml
- set up the database:
pgsql.create: example_com
env: [staging, live]
```
This option may be given as `environments`, `environs`, `envs`, or simply `env`. It may be a list or CSV string.
`register` defines the name of a variable to which the result of the statement should be saved. For some commands, it may be included by default when the statement is generated, but may be suppressed using `include_register=False`.
The `shell` defines the shell to be used for command execution. It is not used for statement generation, but may be used programmatically -- for example, with Python's subprocess module. Some commands (such as Django management commands) may need a shell to be explicitly defined.
As this option is intended for programmatic use, it would be better to define a default shell for all command execution and use this option only when the default should be overridden.
A `yes` indicates processing should stop if the statement fails to execute with success. If provided, it is included by default when the statement is generated, but may be suppressed. Additionally, when [register](#register) is defined, this option will use the result of the command to determine success. This option is also useful for programmatic execution.
The `sudo` option may be defined as `yes` or a username. This will cause the statement to be generated with sudo.
```ini
[install apache]
install: apache2
sudo: yes
```
!!! note
When present, sudo is always generated as part of the statement. For programmatic use, it may be better to control how and when sudo is applied using some other mechanism. If sudo should be used for all statements, it can be passed as a global option.
Options that are not recognized as common or as part of those specific to a command are still processed by the loader. This makes it possible to define your own options based on the needs of a given implementation.
For example, suppose you are implementing a deployment system where some commands should run locally, but most should run on the remote server.
This will be of no use as a generated script since the generator does not know about `local` and `remote`, but these could (for example) be used programmatically to control whether Python subprocess or an SSH client is invoked.
## Template Processing
Commands often need to be specific to an environment or installation. To facilitate this, the configuration file may be parsed as a Jinja2 template prior to processing and generating the statements. This happens automatically when variables are provided.
Template context [may be provided on the command line](../cli.md#context-variables-may-be-provided-on-the-command-line), using a [variables file](variables.md), or both.