From 2f7c368d91ab2a8ae3dd9f2b7df206a076c7a47b Mon Sep 17 00:00:00 2001 From: Oliver Ford Date: Fri, 19 Feb 2021 17:56:48 +0000 Subject: [PATCH] Document `inline` & `on_failure` behaviour cf. #27554 --- .../docs/language/resources/provisioners/remote-exec.html.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/language/resources/provisioners/remote-exec.html.md b/website/docs/language/resources/provisioners/remote-exec.html.md index 7962cdd00..312728300 100644 --- a/website/docs/language/resources/provisioners/remote-exec.html.md +++ b/website/docs/language/resources/provisioners/remote-exec.html.md @@ -48,6 +48,8 @@ The following arguments are supported: that will be copied to the remote resource and then executed. They are executed in the order they are provided. This cannot be provided with `inline` or `script`. +-> **Note:** Since `inline` is implemented by concatenating commands into a script, [`on_failure`](/docs/language/resources/provisioners/syntax.html#failure-behavior) applies only to the final command in the list. In particular, with `on_failure = fail` (the default behaviour) earlier commands will be allowed to fail, and later commands will also execute. If this behaviour is not desired, consider using `"set -o errexit"` as the first command. + ## Script Arguments You cannot pass any arguments to scripts using the `script` or