github.com/raghuse92/packer@v1.3.2/website/source/docs/provisioners/converge.html.md (about) 1 --- 2 description: | 3 The converge Packer provisioner uses Converge modules to provision the 4 machine. 5 layout: docs 6 page_title: 'Converge - Provisioners' 7 sidebar_current: 'docs-provisioners-converge' 8 --- 9 10 # Converge Provisioner 11 12 Type: `converge` 13 14 The [Converge](http://converge.aster.is) Packer provisioner uses Converge 15 modules to provision the machine. It uploads module directories to use as 16 source, or you can use remote modules. 17 18 The provisioner can optionally bootstrap the Converge client/server binary onto 19 new images. 20 21 ## Basic Example 22 23 The example below is fully functional. 24 25 ``` json 26 { 27 "type": "converge", 28 "module": "https://raw.githubusercontent.com/asteris-llc/converge/master/samples/fileContent.hcl", 29 "params": { 30 "message": "Hello, Packer!" 31 } 32 } 33 ``` 34 35 ## Configuration Reference 36 37 The reference of available configuration options is listed below. The only 38 required element is "module". Every other option is optional. 39 40 - `module` (string) - Path (or URL) to the root module that Converge will apply. 41 42 Optional parameters: 43 44 - `bootstrap` (boolean, defaults to false) - Set to allow the provisioner to 45 download the latest Converge bootstrap script and the specified `version` of 46 Converge from the internet. 47 48 - `version` (string) - Set to a [released Converge version](https://github.com/asteris-llc/converge/releases) for bootstrap. 49 50 - `module_dirs` (array of directory specifications) - Module directories to 51 transfer to the remote host for execution. See below for the specification. 52 53 - `working_directory` (string) - The directory that Converge will change to 54 before execution. 55 56 - `params` (maps of string to string) - parameters to pass into the root module. 57 58 - `execute_command` (string) - the command used to execute Converge. This has 59 various 60 [configuration template variables](/docs/templates/engine.html) available. 61 62 - `prevent_sudo` (boolean) - stop Converge from running with administrator 63 privileges via sudo 64 65 - `bootstrap_command` (string) - the command used to bootstrap Converge. This 66 has various 67 [configuration template variables](/docs/templates/engine.html) available. 68 69 - `prevent_bootstrap_sudo` (boolean) - stop Converge from bootstrapping with 70 administrator privileges via sudo 71 72 ### Module Directories 73 74 The provisioner can transfer module directories to the remote host for 75 provisioning. Of these fields, `source` and `destination` are required in every 76 directory. 77 78 - `source` (string) - the path to the folder on the local machine. 79 80 - `destination` (string) - the path to the folder on the remote machine. Parent 81 directories will not be created; use the shell module to do this. 82 83 - `exclude` (array of string) - files and directories to exclude from transfer. 84 85 ### Execute Command 86 87 By default, Packer uses the following command (broken across multiple lines for readability) to execute Converge: 88 89 ``` liquid 90 cd {{.WorkingDirectory}} && \ 91 {{if .Sudo}}sudo {{end}}converge apply \ 92 --local \ 93 --log-level=WARNING \ 94 --paramsJSON '{{.ParamsJSON}}' \ 95 {{.Module}} 96 ``` 97 98 This command can be customized using the `execute_command` configuration. As you 99 can see from the default value above, the value of this configuration can 100 contain various template variables: 101 102 - `WorkingDirectory` - `directory` from the configuration. 103 - `Sudo` - the opposite of `prevent_sudo` from the configuration. 104 - `ParamsJSON` - The unquoted JSONified form of `params` from the configuration. 105 - `Module` - `module` from the configuration. 106 107 ### Bootstrap Command 108 109 By default, Packer uses the following command to bootstrap Converge: 110 111 ``` liquid 112 curl -s https://get.converge.sh | {{if .Sudo}}sudo {{end}}sh {{if ne .Version ""}}-s -- -v {{.Version}}{{end}} 113 ``` 114 115 This command can be customized using the `bootstrap_command` configuration. As you 116 can see from the default values above, the value of this configuration can 117 contain various template variables: 118 119 - `Sudo` - the opposite of `prevent_bootstrap_sudo` from the configuration. 120 - `Version` - `version` from the configuration.