diff --git a/website/source/docs/extend/post-processor.html.markdown b/website/source/docs/extend/post-processor.html.markdown index 8148a4a0e..bec75b06b 100644 --- a/website/source/docs/extend/post-processor.html.markdown +++ b/website/source/docs/extend/post-processor.html.markdown @@ -38,7 +38,7 @@ what each method should do.
type PostProcessor interface {
Configure(interface{}) error
- PostProcess(Ui, Artifact) (Artifact, error)
+ PostProcess(Ui, Artifact) (a Artifact, keep bool, err error)
}
@@ -79,3 +79,15 @@ a "compress" post-processor that is responsible for compressing files,
the transformation would be taking the `Files()` from the original artifact,
compressing them, and creating a new artifact with a single file: the
compressed archive.
+
+The result signature of this method is `(Artifact, bool, error)`. Each
+return value is explained below:
+
+* `Artifact` - The newly created artifact if no errors occurred.
+* `bool` - If true, the input artifact will forcefully be kept. By default,
+ Packer typically deletes all input artifacts, since the user doesn't generally
+ want intermediary artifacts. However, some post-processors depend on the
+ previous artifact existing. If this is `true`, it forces packer to keep the
+ artifact around.
+* `error` - Non-nil if there was an error in any way. If this is the case,
+ the other two return values are ignored.