From bfd160cf4afeec4a0e883255ae34478a35564160 Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Mon, 4 Jan 2021 16:33:22 +0000 Subject: [PATCH] feat(ps1): implement Vagrant grains_config option bootstrap-salt.sh already does this. --- bootstrap-salt.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index 2e98e48..2557e85 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -210,6 +210,13 @@ If (Test-Path C:\tmp\minion) { $ConfiguredAnything = $True } +# Check if grains config has been uploaded +If (Test-Path C:\tmp\grains) { + New-Item C:\salt\conf\ -ItemType Directory -Force | Out-Null + Copy-Item -Path C:\tmp\grains -Destination C:\salt\conf\ -Force | Out-Null + $ConfiguredAnything = $True +} + If ($ConfigureOnly -and !$ConfiguredAnything) { Write-Output "No configuration or keys were copied over. No configuration was done!" exit 0