mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add warning message when Chocolatey was installed (#25918)
This commit is contained in:
parent
7cc38e1b32
commit
0dddae7ffa
1 changed files with 2 additions and 1 deletions
|
@ -66,7 +66,7 @@ Function Chocolatey-Install-Upgrade
|
||||||
if ($ChocoAlreadyInstalled -eq $null)
|
if ($ChocoAlreadyInstalled -eq $null)
|
||||||
{
|
{
|
||||||
|
|
||||||
#We need to install chocolatey
|
# We need to install chocolatey
|
||||||
$install_output = (new-object net.webclient).DownloadString("https://chocolatey.org/install.ps1") | powershell -
|
$install_output = (new-object net.webclient).DownloadString("https://chocolatey.org/install.ps1") | powershell -
|
||||||
if ($LASTEXITCODE -ne 0)
|
if ($LASTEXITCODE -ne 0)
|
||||||
{
|
{
|
||||||
|
@ -75,6 +75,7 @@ Function Chocolatey-Install-Upgrade
|
||||||
}
|
}
|
||||||
$result.changed = $true
|
$result.changed = $true
|
||||||
$script:executable = "C:\ProgramData\chocolatey\bin\choco.exe"
|
$script:executable = "C:\ProgramData\chocolatey\bin\choco.exe"
|
||||||
|
Add-Warning $result 'Chocolatey was missing from this system, so it was installed during this task run.'
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue