From 4a46d6ff7baa5bc95920c428a1ccdb645e7084d6 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Apr 2020 00:44:00 -0400 Subject: [PATCH] docs/provisioner/powershell: Add documentation for `skip_clean` option --- provisioner/powershell/provisioner.go | 5 ++++- website/pages/docs/provisioners/powershell.mdx | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index bb9ecf9ab..a31f787a7 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -53,7 +53,10 @@ type Config struct { ElevatedExecuteCommand string `mapstructure:"elevated_execute_command"` // Whether to clean scripts up after executing the provisioner. - // Defaults to false. + // Defaults to false. When true any script created by a non-elevated Powershell + // provisioner will be removed from the remote machine. Elevated scripts, + // along with the scheduled tasks, will always be removed regardless of the + // value set for `skip_clean`. SkipClean bool `mapstructure:"skip_clean"` // The timeout for retrying to start the process. Until this timeout is diff --git a/website/pages/docs/provisioners/powershell.mdx b/website/pages/docs/provisioners/powershell.mdx index d7ee89076..93cbd2cc7 100644 --- a/website/pages/docs/provisioners/powershell.mdx +++ b/website/pages/docs/provisioners/powershell.mdx @@ -142,6 +142,12 @@ The example below is fully functional. script is uploaded to. The value must be a writable location and any parent directories must already exist. +- `skip_clean` (bool) - Whether to clean scripts up after executing the provisioner. + Defaults to false. When true any script created by a non-elevated Powershell + provisioner will be removed from the remote machine. Elevated scripts, + along with the scheduled tasks, will always be removed regardless of the + value set for `skip_clean`. + - `start_retry_timeout` (string) - The amount of time to attempt to _start_ the remote process. By default this is "5m" or 5 minutes. This setting exists in order to deal with times when SSH may restart, such as a system