feat(ps1): implement Vagrant grains_config option

bootstrap-salt.sh already does this.
This commit is contained in:
Dafydd Jones 2021-01-04 16:33:22 +00:00
parent 0a2d8f5851
commit bfd160cf4a
No known key found for this signature in database
GPG key ID: 2AECA3C95F1A80A7

View file

@ -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