Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Install salt minion for Windows

# Windows: Using Windows PowerShell or PowerShell Core
# Download
Invoke-WebRequest -Uri https://winbootstrap.saltproject.io -OutFile C:Tempootstrap-salt.ps1
Invoke-WebRequest -Uri https://winbootstrap.saltproject.io/sha256 -OutFile C:Tempootstrap-salt-sha256

# Verify file integrity
$FileSha = (Get-FileHash C:Tempootstrap-salt.ps1).hash
$ValidatedSha = Get-Content C:Tempootstrap-salt-sha256
if ("$FileSha" -eq "$ValidatedSha") {
    # After verification, run Windows minion install
    Write-Output "Success! Installing..."
    Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
    C:Tempootstrap-salt.ps1
    Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser
} else {
    # If hash check fails, don't attempt install
    Write-Error "WARNING: This file is corrupt or has been tampered with."
}
Source by repo.saltproject.io #
 
PREVIOUS NEXT
Tagged: #Install #salt #minion #Windows
ADD COMMENT
Topic
Name
7+4 =