-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import provisioner partials from Packer core #77
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...ernal/renderdocs/docs-partials/packer-plugin-sdk/provisioners/common-config.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Parameters common to all provisioners: | ||
|
||
- `pause_before` (duration) - Sleep for duration before execution. | ||
|
||
- `max_retries` (int) - Max times the provisioner will retry in case of failure. Defaults to zero (0). Zero means an error will not be retried. | ||
|
||
- `only` (array of string) - Only run the provisioner for listed builder(s) | ||
by name. | ||
|
||
- `override` (object) - Override the builder with different settings for a | ||
specific builder, eg : | ||
|
||
In HCL2: | ||
|
||
```hcl | ||
source "null" "example1" { | ||
communicator = "none" | ||
} | ||
|
||
source "null" "example2" { | ||
communicator = "none" | ||
} | ||
|
||
build { | ||
sources = ["source.null.example1", "source.null.example2"] | ||
provisioner "shell-local" { | ||
inline = ["echo not overridden"] | ||
override = { | ||
example1 = { | ||
inline = ["echo yes overridden"] | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
In JSON: | ||
|
||
```json | ||
{ | ||
"builders": [ | ||
{ | ||
"type": "null", | ||
"name": "example1", | ||
"communicator": "none" | ||
}, | ||
{ | ||
"type": "null", | ||
"name": "example2", | ||
"communicator": "none" | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "shell-local", | ||
"inline": ["echo not overridden"], | ||
"override": { | ||
"example1": { | ||
"inline": ["echo yes overridden"] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
- `timeout` (duration) - If the provisioner takes more than for example | ||
`1h10m1s` or `10m` to finish, the provisioner will timeout and fail. |
9 changes: 9 additions & 0 deletions
9
...derdocs/docs-partials/packer-plugin-sdk/provisioners/community_provisioners.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### Community Provisioners | ||
|
||
- [Comment Provisioner](https://github.com/SwampDragons/packer-provisioner-comment) - | ||
Example provisioner that allows you to annotate your build with bubble-text | ||
comments. | ||
|
||
- [Windows Update provisioner](https://github.com/rgl/packer-provisioner-windows-update) - | ||
A provisioner for gracefully handling windows updates and the reboots they | ||
cause. |
30 changes: 30 additions & 0 deletions
30
...ternal/renderdocs/docs-partials/packer-plugin-sdk/provisioners/shell-config.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
1 change: 1 addition & 0 deletions
1
...renderdocs/docs-partials/packer-plugin-sdk/provisioners/unmaintained-plugin.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
~> **This community maintained provisioner is currently unmaintained**; if you are interested in contributing or taking ownership of it, please reach out to us at [packer@hashicorp.com](mailto://packer@hashicorp.com). More details can be found in the [README](https://github.com/hashicorp/packer/blob/master/README.md#unmaintained-plugins). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this one here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not, I just brought it with the folder, removing