-
Notifications
You must be signed in to change notification settings - Fork 54
PE-38219 - Support air gapped installation while using a Windows as Jump host #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
08d0668
47ba144
c25743f
6bdd501
f1ec6b6
d770e50
2291257
59d1fcb
2ba1cc0
2be7426
875a8b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# download.ps1 | ||
Param( | ||
$source, | ||
$path | ||
) | ||
|
||
try { | ||
[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; $webClient = New-Object System.Net.WebClient; $webClient.DownloadFile($source, $path); | ||
}catch { | ||
Write-Host "Installer failed with Exception: $_.Exception.Message" | ||
Exit 1 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# filesize.ps1 | ||
Param( | ||
$path | ||
) | ||
if ([string]::IsNullOrEmpty($path)){ | ||
Write-Host "No path provided to filesize" | ||
Exit 1 | ||
} | ||
try { | ||
|
||
# Get the File | ||
$File = Get-Item -Path $path | ||
# Get the File Size | ||
$size = $File.Length | ||
|
||
# Output a JSON result for ease of Task usage in Puppet Task Plans | ||
if ($size -eq $null) { | ||
Write-Host "{'size': '$null'}" | ||
}else{ | ||
Write-Host "{'size': '$size'}" | ||
} | ||
|
||
return $size | ||
|
||
}catch { | ||
Write-Host "Installer failed with Exception: $_.Exception.Message" | ||
Exit 1 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the whole task required? can't you use https://forge.puppet.com/modules/puppetlabs/facts/readme ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tried to run factor with operatingsystem but because this is an install some people may not have run puppet agent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The task works fine without facter/puppet. They don't need to be installed. That's why I suggested it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think this should be addressed before merging. |
||
"description": "Return the operating system runnin gon the target as a string", | ||
"parameters": { }, | ||
"implementations": [ | ||
{"name": "os_identification.sh", "requirements": ["shell"], "input_method": "environment"}, | ||
{"name": "os_identification.ps1", "requirements": ["powershell"]} | ||
] | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# os_identification.ps1 | ||
try { | ||
|
||
$os = [System.Environment]::OSVersion.Platform | ||
|
||
if ($os -eq "Win32NT") { | ||
$osfamily = "windows" | ||
}elseif ($os -eq "Unix") { | ||
$osfamily = "unix" | ||
}else { | ||
$osfamily = "unknown" | ||
} | ||
|
||
return $osfamily | ||
}catch { | ||
Write-Host "Installer failed with Exception: $_.Exception.Message" | ||
Exit 1 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
osfamily="linux" | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
osfamily="macOS" | ||
elif [[ "$OSTYPE" == "cygwin" ]]; then | ||
osfamily="cygwin" | ||
elif [[ "$OSTYPE" == "msys" ]]; then | ||
osfamily="msys" | ||
elif [[ "$OSTYPE" == "win32" ]]; then | ||
osfamily="windows" | ||
elif [[ "$OSTYPE" == "freebsd"* ]]; then | ||
osfamily="freebsd" | ||
else | ||
osfamily="unknown" | ||
fi | ||
|
||
echo $osfamily | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this commented out?