diff --git a/website/source/docs/provisioners/powershell.html.md b/website/source/docs/provisioners/powershell.html.md.erb similarity index 89% rename from website/source/docs/provisioners/powershell.html.md rename to website/source/docs/provisioners/powershell.html.md.erb index d12a39f14..50b4ba312 100644 --- a/website/source/docs/provisioners/powershell.html.md +++ b/website/source/docs/provisioners/powershell.html.md.erb @@ -31,33 +31,7 @@ The example below is fully functional. ## Configuration Reference -The reference of available configuration options is listed below. The only -required element is either "inline" or "script". Every other option is -optional. - -Exactly *one* of the following is required: - -- `inline` (array of strings) - This is an array of commands to execute. The - commands are concatenated by newlines and turned into a single file, so - they are all executed within the same context. This allows you to change - directories in one command and use something in the directory in the next - and so on. Inline scripts are the easiest way to pull off simple tasks - within the machine. - -- `script` (string) - The path to a script to upload and execute in the - machine. This path can be absolute or relative. If it is relative, it is - relative to the working directory when Packer is executed. - -- `scripts` (array of strings) - An array of scripts to execute. The scripts - will be uploaded and executed in the order specified. Each script is - executed in isolation, so state such as variables from one script won't - carry on to the next. - -Optional parameters: - -- `binary` (boolean) - If true, specifies that the script(s) are binary - files, and Packer should therefore not convert Windows line endings to Unix - line endings (if there are any). By default this is false. +<%= partial "partials/provisioners/shell-config" %> - `elevated_execute_command` (string) - The command to use to execute the elevated script. By default this is as follows: @@ -155,9 +129,6 @@ Optional parameters: exists in order to deal with times when SSH may restart, such as a system reboot. Set this to a higher value if reboots take a longer amount of time. -- `valid_exit_codes` (list of ints) - Valid exit codes for the script. By - default this is just 0. - ## Default Environmental Variables In addition to being able to specify custom environmental variables using the diff --git a/website/source/docs/provisioners/shell.html.md b/website/source/docs/provisioners/shell.html.md.erb similarity index 89% rename from website/source/docs/provisioners/shell.html.md rename to website/source/docs/provisioners/shell.html.md.erb index 65ad496fd..d4b40c96d 100644 --- a/website/source/docs/provisioners/shell.html.md +++ b/website/source/docs/provisioners/shell.html.md.erb @@ -33,33 +33,7 @@ The example below is fully functional. ## Configuration Reference -The reference of available configuration options is listed below. The only -required element is either "inline" or "script". Every other option is -optional. - -Exactly *one* of the following is required: - -- `inline` (array of strings) - This is an array of commands to execute. The - commands are concatenated by newlines and turned into a single file, so - they are all executed within the same context. This allows you to change - directories in one command and use something in the directory in the next - and so on. Inline scripts are the easiest way to pull off simple tasks - within the machine. - -- `script` (string) - The path to a script to upload and execute in the - machine. This path can be absolute or relative. If it is relative, it is - relative to the working directory when Packer is executed. - -- `scripts` (array of strings) - An array of scripts to execute. The scripts - will be uploaded and executed in the order specified. Each script is - executed in isolation, so state such as variables from one script won't - carry on to the next. - -Optional parameters: - -- `binary` (boolean) - If true, specifies that the script(s) are binary - files, and Packer should therefore not convert Windows line endings to Unix - line endings (if there are any). By default this is false. +<%= partial "partials/provisioners/shell-config" %> - `environment_vars` (array of strings) - An array of key/value pairs to inject prior to the execute\_command. The format should be `key=value`. diff --git a/website/source/docs/provisioners/windows-shell.html.md b/website/source/docs/provisioners/windows-shell.html.md.erb similarity index 67% rename from website/source/docs/provisioners/windows-shell.html.md rename to website/source/docs/provisioners/windows-shell.html.md.erb index 4b13ab243..cbec0c3cc 100644 --- a/website/source/docs/provisioners/windows-shell.html.md +++ b/website/source/docs/provisioners/windows-shell.html.md.erb @@ -27,33 +27,7 @@ The example below is fully functional. ## Configuration Reference -The reference of available configuration options is listed below. The only -required element is either "inline" or "script". Every other option is -optional. - -Exactly *one* of the following is required: - -- `inline` (array of strings) - This is an array of commands to execute. The - commands are concatenated by newlines and turned into a single file, so - they are all executed within the same context. This allows you to change - directories in one command and use something in the directory in the next - and so on. Inline scripts are the easiest way to pull off simple tasks - within the machine. - -- `script` (string) - The path to a script to upload and execute in the - machine. This path can be absolute or relative. If it is relative, it is - relative to the working directory when Packer is executed. - -- `scripts` (array of strings) - An array of scripts to execute. The scripts - will be uploaded and executed in the order specified. Each script is - executed in isolation, so state such as variables from one script won't - carry on to the next. - -Optional parameters: - -- `binary` (boolean) - If true, specifies that the script(s) are binary - files, and Packer should therefore not convert Windows line endings to Unix - line endings (if there are any). By default this is false. +<%= partial "partials/provisioners/shell-config" %> - `environment_vars` (array of strings) - An array of key/value pairs to inject prior to the execute\_command. The format should be `key=value`. @@ -75,9 +49,6 @@ Optional parameters: exists in order to deal with times when SSH may restart, such as a system reboot. Set this to a higher value if reboots take a longer amount of time. -- `valid_exit_codes` (list of ints) - Valid exit codes for the script. By - default this is just 0. - ## Default Environmental Variables In addition to being able to specify custom environmental variables using the diff --git a/website/source/partials/provisioners/_shell-config.html.md b/website/source/partials/provisioners/_shell-config.html.md new file mode 100644 index 000000000..7e2ae0311 --- /dev/null +++ b/website/source/partials/provisioners/_shell-config.html.md @@ -0,0 +1,30 @@ +The reference of available configuration options is listed below. The only +required element is either "inline" or "script". Every other option is +optional. + +Exactly *one* of the following is required: + +- `inline` (array of strings) - This is an array of commands to execute. The + commands are concatenated by newlines and turned into a single file, so + they are all executed within the same context. This allows you to change + directories in one command and use something in the directory in the next + and so on. Inline scripts are the easiest way to pull off simple tasks + within the machine. + +- `script` (string) - The path to a script to upload and execute in the + machine. This path can be absolute or relative. If it is relative, it is + relative to the working directory when Packer is executed. + +- `scripts` (array of strings) - An array of scripts to execute. The scripts + will be uploaded and executed in the order specified. Each script is + executed in isolation, so state such as variables from one script won't + carry on to the next. + +Optional parameters: + +- `binary` (boolean) - If true, specifies that the script(s) are binary + files, and Packer should therefore not convert Windows line endings to Unix + line endings (if there are any). By default this is false. + +- `valid_exit_codes` (list of ints) - Valid exit codes for the script. By + default this is just 0.