Skip to content

Commit

Permalink
As per review comment added logging messages
Browse files Browse the repository at this point in the history
Signed-off-by: NAshwini <[email protected]>
  • Loading branch information
NAshwini committed Jul 1, 2020
1 parent 099c274 commit 8cfb9d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ChefExtensionHandler/bin/chef-install.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function Install-ChefClient {
$daemon = "service"
}
if (-Not $chef_pkg -and -Not $chef_downloaded_package -and -Not $chef_package_url) {
echo "Downloading Chef Client ..."
$chef_package_version = Get-PublicSettings-From-Config-Json "bootstrap_version" $powershellVersion
$chef_package_channel = Get-PublicSettings-From-Config-Json "bootstrap_channel" $powershellVersion

Expand All @@ -89,10 +90,12 @@ function Install-ChefClient {
} elseif ( -Not $chef_pkg -and $chef_downloaded_package ) {
Install-ChefMsi $chef_downloaded_package $daemon
} elseif ( -Not $chef_pkg -and $chef_package_url ) {
# Saving .msi in TEMP folder with pattern accepted by `Invoke-WebRequest`
$chef_downloaded_package = "$env:TEMP\chef-client.msi"
echo "Downloading chef client package from $chef_package_url"
Invoke-WebRequest -Uri $chef_package_url -OutFile $chef_downloaded_package
echo "Installing chef client from path $chef_downloaded_package"
Install-ChefMsi $chef_downloaded_package $daemon
Remove-Item $chef_downloaded_package -force
}
$completed = $true
}
Expand Down

0 comments on commit 8cfb9d7

Please sign in to comment.