provisioner(converge): update documentation with new schema

pull/4326/head
Brian Hicks 9 years ago
parent 3311d3a48d
commit 30a393d4c2
No known key found for this signature in database
GPG Key ID: FF1F407C0D3C2430

@ -23,25 +23,19 @@ The example below is fully functional.
``` {.javascript} ``` {.javascript}
{ {
"type": "converge", "type": "converge",
"modules": [ "module": "https://raw.githubusercontent.com/asteris-llc/converge/master/samples/fileContent.hcl",
{ "params": {
"module": "https://raw.githubusercontent.com/asteris-llc/converge/master/samples/fileContent.hcl", "message": "Hello, Packer!"
"params": { }
"message": "Hello, Packer!"
}
}
]
} }
``` ```
## Configuration Reference ## Configuration Reference
The reference of available configuration options is listed below. The only The reference of available configuration options is listed below. The only
required element is "modules", of which there must be at least one. Every other required element is "module". Every other option is optional.
option is optional.
- `modules` (array of module specifications) - The root modules to run by - `module` (string) - Path (or URL) to the root module that Converge will apply.
Converge. See below for the specification.
Optional parameters: Optional parameters:
@ -54,19 +48,15 @@ Optional parameters:
- `module_dirs` (array of directory specifications) - Module directories to - `module_dirs` (array of directory specifications) - Module directories to
transfer to the remote host for execution. See below for the specification. transfer to the remote host for execution. See below for the specification.
### Modules - `working_directory` (string) - The directory that Converge will change to
before execution.
Modules control what Converge applies to your system. The `modules` key should
be a list of objects with the following keys. Of these, only `module` is
required.
- `module` (string) - the path (or URL) to the root module.
- `directory` (string) - the directory to run Converge in. If not set, the
provisioner will use `/tmp` by default.
- `params` (maps of string to string) - parameters to pass into the root module. - `params` (maps of string to string) - parameters to pass into the root module.
- `execute_command` (string) - the command used to execute Converge. This has
various
[configuration template variables](/docs/templates/configuration-templates.html) available.
### Module Directories ### Module Directories
The provisioner can transfer module directories to the remote host for The provisioner can transfer module directories to the remote host for
@ -79,3 +69,24 @@ directory.
directories will not be created; use the shell module to do this. directories will not be created; use the shell module to do this.
- `exclude` (array of string) - files and directories to exclude from transfer. - `exclude` (array of string) - files and directories to exclude from transfer.
### Execute Command
By default, Packer uses the following command (broken across multiple lines for readability) to execute Converge:
``` {.liquid}
cd {{.WorkingDirectory}} && \
sudo converge apply \
--local \
--log-level=WARNING \
--paramsJSON '{{.ParamsJSON}}' \
{{.Module}}
```
This command can be customized using the `execute_command` configuration. As you
can see from the default value above, the value of this configuration can
contain various template variables:
- `WorkingDirectory` - `directory` from the configuration
- `ParamsJSON` - The unquoted JSONified form of `params` from the configuration.
- `Module` - `module` from the configuration.

Loading…
Cancel
Save