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

CLI "choco install rsat" works win_chocolatey install rsat fails #39384

Closed
basictheprogram opened this Issue Apr 26, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@basictheprogram

basictheprogram commented Apr 26, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_chocolatey

ANSIBLE VERSION
$ ansible --version
ansible 2.6.0 (devel 33f358383a) last updated 2018/04/26 09:09:51 (GMT -500)
  config file = None
  configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible
  executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible
  python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
CONFIGURATION

$ ansible-config dump --only-changed
$

OS / ENVIRONMENT

Ansible host: macOS 10.12.6
Managed host: Windows 10

SUMMARY

Doing a "choco install rsat" from a powershell command line the RSAT package installs without errors.

PS C:\Users\Administrator> choco install rsat
Chocolatey v0.10.10
Installing the following packages:
rsat
By installing you accept licenses for the packages.
Progress: Downloading RSAT 2.1... 100%

RSAT v2.1 [Approved]
rsat package files install completed. Performing other installation steps.
Windows 10 Detected
x64 Detected
Installing RSAT...
RSAT has been installed.
 The install of rsat was successful.
  Software installed as 'msu', install location is likely default.

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
STEPS TO REPRODUCE
- name: Install programs (choco)
  win_chocolatey:
    name: rsat
    state: "present"
EXPECTED RESULTS

The RSAT package would be installed.

ACTUAL RESULTS
Using module file /Users/tanner/projects/ansible.git/ansible/lib/ansible/modules/windows/win_chocolatey.ps1
EXEC (via pipeline wrapper)
failed: [vagrant-10.corp.mylab.com] (item=rsat) => {
    "changed": false,
    "command": "choco.exe install -v --no-progress -y rsat --timeout 2700 --failonunfound",
    "item": "rsat",
    "msg": "Error installing package 'rsat'",
    "rc": 5,
    "stdout": "Chocolatey v0.10.10\r\nInstalling the following packages:\r\nrsat\r\nBy installing you accept licenses for the packages.\r\n[NuGet] Installing 'RSAT 2.1'.\r\n[NuGet] Successfully installed 'RSAT 2.1'.\r\n\r\nRSAT v2.1 [Approved]\r\nrsat package files install completed. Performing other installation steps.\r\nVERBOSE: Exporting function 'Format-FileSize'.\r\nVERBOSE: Exporting function 'Get-ChecksumValid'.\r\nVERBOSE: Exporting function 'Get-ChocolateyUnzip'.\r\nVERBOSE: Exporting function 'Get-ChocolateyWebFile'.\r\nVERBOSE: Exporting function 'Get-EnvironmentVariable'.\r\nVERBOSE: Exporting function 'Get-EnvironmentVariableNames'.\r\nVERBOSE: Exporting function 'Get-FtpFile'.\r\nVERBOSE: Exporting function 'Get-OSArchitectureWidth'.\r\nVERBOSE: Exporting function 'Get-PackageParameters'.\r\nVERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.\r\nVERBOSE: Exporting function 'Get-ToolsLocation'.\r\nVERBOSE: Exporting function 'Get-UACEnabled'.\r\nVERBOSE: Exporting function 'Get-UninstallRegistryKey'.\r\nVERBOSE: Exporting function 'Get-VirusCheckValid'.\r\nVERBOSE: Exporting function 'Get-WebFile'.\r\nVERBOSE: Exporting function 'Get-WebFileName'.\r\nVERBOSE: Exporting function 'Get-WebHeaders'.\r\nVERBOSE: Exporting function 'Install-BinFile'.\r\nVERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.\r\nVERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.\r\nVERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.\r\nVERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.\r\nVERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPackage'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPath'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.\r\nVERBOSE: Exporting function 'Install-ChocolateyShortcut'.\r\nVERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.\r\nVERBOSE: Exporting function 'Install-ChocolateyZipPackage'.\r\nVERBOSE: Exporting function 'Install-Vsix'.\r\nVERBOSE: Exporting function 'Set-EnvironmentVariable'.\r\nVERBOSE: Exporting function 'Set-PowerShellExitCode'.\r\nVERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.\r\nVERBOSE: Exporting function 'Test-ProcessAdminRights'.\r\nVERBOSE: Exporting function 'Uninstall-BinFile'.\r\nVERBOSE: Exporting function 'Uninstall-ChocolateyEnvironmentVariable'.\r\nVERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.\r\nVERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.\r\nVERBOSE: Exporting function 'Update-SessionEnvironment'.\r\nVERBOSE: Exporting function 'Write-ChocolateyFailure'.\r\nVERBOSE: Exporting function 'Write-ChocolateySuccess'.\r\nVERBOSE: Exporting function 'Write-FileUpdateLog'.\r\nVERBOSE: Exporting function 'Write-FunctionCallLogMessage'.\r\nVERBOSE: Exporting alias 'Get-ProcessorBits'.\r\nVERBOSE: Exporting alias 'Get-OSBitness'.\r\nVERBOSE: Exporting alias 'Get-InstallRegistryKey'.\r\nVERBOSE: Exporting alias 'Generate-BinFile'.\r\nVERBOSE: Exporting alias 'Add-BinFile'.\r\nVERBOSE: Exporting alias 'Start-ChocolateyProcess'.\r\nVERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.\r\nVERBOSE: Exporting alias 'Remove-BinFile'.\r\nVERBOSE: Exporting alias 'refreshenv'.\r\nVERBOSE: Loading module from path 'C:\\ProgramData\\chocolatey\\extensions\\chocolatey-core\\chocolatey-core.psm1'.\r\nVERBOSE: Exporting function 'Get-UninstallRegistryKey'.\r\nVERBOSE: Exporting function 'Get-AppInstallLocation'.\r\nVERBOSE: Exporting function 'Get-AvailableDriveLetter'.\r\nVERBOSE: Exporting function 'Get-EffectiveProxy'.\r\nVERBOSE: Exporting function 'Get-PackageCacheLocation'.\r\nVERBOSE: Exporting function 'Get-PackageParameters'.\r\nVERBOSE: Exporting function 'Get-WebContent'.\r\nVERBOSE: Exporting function 'Register-Application'.\r\nVERBOSE: Importing function 'Get-AppInstallLocation'.\r\nVERBOSE: Importing function 'Get-AvailableDriveLetter'.\r\nVERBOSE: Importing function 'Get-EffectiveProxy'.\r\nVERBOSE: Importing function 'Get-PackageCacheLocation'.\r\nVERBOSE: Importing function 'Get-PackageParameters'.\r\nVERBOSE: Importing function 'Get-UninstallRegistryKey'.\r\nVERBOSE: Importing function 'Get-WebContent'.\r\nVERBOSE: Importing function 'Register-Application'.\r\nVERBOSE: Exporting function 'Format-FileSize'.\r\nVERBOSE: Exporting function 'Get-ChecksumValid'.\r\nVERBOSE: Exporting function 'Get-ChocolateyUnzip'.\r\nVERBOSE: Exporting function 'Get-ChocolateyWebFile'.\r\nVERBOSE: Exporting function 'Get-EnvironmentVariable'.\r\nVERBOSE: Exporting function 'Get-EnvironmentVariableNames'.\r\nVERBOSE: Exporting function 'Get-FtpFile'.\r\nVERBOSE: Exporting function 'Get-OSArchitectureWidth'.\r\nVERBOSE: Exporting function 'Get-PackageParameters'.\r\nVERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.\r\nVERBOSE: Exporting function 'Get-ToolsLocation'.\r\nVERBOSE: Exporting function 'Get-UACEnabled'.\r\nVERBOSE: Exporting function 'Get-UninstallRegistryKey'.\r\nVERBOSE: Exporting function 'Get-VirusCheckValid'.\r\nVERBOSE: Exporting function 'Get-WebFile'.\r\nVERBOSE: Exporting function 'Get-WebFileName'.\r\nVERBOSE: Exporting function 'Get-WebHeaders'.\r\nVERBOSE: Exporting function 'Install-BinFile'.\r\nVERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.\r\nVERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.\r\nVERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.\r\nVERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.\r\nVERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPackage'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPath'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.\r\nVERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.\r\nVERBOSE: Exporting function 'Install-ChocolateyShortcut'.\r\nVERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.\r\nVERBOSE: Exporting function 'Install-ChocolateyZipPackage'.\r\nVERBOSE: Exporting function 'Install-Vsix'.\r\nVERBOSE: Exporting function 'Set-EnvironmentVariable'.\r\nVERBOSE: Exporting function 'Set-PowerShellExitCode'.\r\nVERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.\r\nVERBOSE: Exporting function 'Test-ProcessAdminRights'.\r\nVERBOSE: Exporting function 'Uninstall-BinFile'.\r\nVERBOSE: Exporting function 'Uninstall-ChocolateyEnvironmentVariable'.\r\nVERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.\r\nVERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.\r\nVERBOSE: Exporting function 'Update-SessionEnvironment'.\r\nVERBOSE: Exporting function 'Write-ChocolateyFailure'.\r\nVERBOSE: Exporting function 'Write-ChocolateySuccess'.\r\nVERBOSE: Exporting function 'Write-FileUpdateLog'.\r\nVERBOSE: Exporting function 'Write-FunctionCallLogMessage'.\r\nVERBOSE: Exporting function 'Get-AppInstallLocation'.\r\nVERBOSE: Exporting function 'Get-AvailableDriveLetter'.\r\nVERBOSE: Exporting function 'Get-EffectiveProxy'.\r\nVERBOSE: Exporting function 'Get-PackageCacheLocation'.\r\nVERBOSE: Exporting function 'Get-WebContent'.\r\nVERBOSE: Exporting function 'Register-Application'.\r\nVERBOSE: Exporting alias 'Get-ProcessorBits'.\r\nVERBOSE: Exporting alias 'Get-OSBitness'.\r\nVERBOSE: Exporting alias 'Get-InstallRegistryKey'.\r\nVERBOSE: Exporting alias 'Generate-BinFile'.\r\nVERBOSE: Exporting alias 'Add-BinFile'.\r\nVERBOSE: Exporting alias 'Start-ChocolateyProcess'.\r\nVERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.\r\nVERBOSE: Exporting alias 'Remove-BinFile'.\r\nVERBOSE: Exporting alias 'refreshenv'.\r\nVERBOSE: Importing function 'Format-FileSize'.\r\nVERBOSE: Importing function 'Get-AppInstallLocation'.\r\nVERBOSE: Importing function 'Get-AvailableDriveLetter'.\r\nVERBOSE: Importing function 'Get-ChecksumValid'.\r\nVERBOSE: Importing function 'Get-ChocolateyUnzip'.\r\nVERBOSE: Importing function 'Get-ChocolateyWebFile'.\r\nVERBOSE: Importing function 'Get-EffectiveProxy'.\r\nVERBOSE: Importing function 'Get-EnvironmentVariable'.\r\nVERBOSE: Importing function 'Get-EnvironmentVariableNames'.\r\nVERBOSE: Importing function 'Get-FtpFile'.\r\nVERBOSE: Importing function 'Get-OSArchitectureWidth'.\r\nVERBOSE: Importing function 'Get-PackageCacheLocation'.\r\nVERBOSE: Importing function 'Get-PackageParameters'.\r\nVERBOSE: Importing function 'Get-PackageParametersBuiltIn'.\r\nVERBOSE: Importing function 'Get-ToolsLocation'.\r\nVERBOSE: Importing function 'Get-UACEnabled'.\r\nVERBOSE: Importing function 'Get-UninstallRegistryKey'.\r\nVERBOSE: Importing function 'Get-VirusCheckValid'.\r\nVERBOSE: Importing function 'Get-WebContent'.\r\nVERBOSE: Importing function 'Get-WebFile'.\r\nVERBOSE: Importing function 'Get-WebFileName'.\r\nVERBOSE: Importing function 'Get-WebHeaders'.\r\nVERBOSE: Importing function 'Install-BinFile'.\r\nVERBOSE: Importing function 'Install-ChocolateyDesktopLink'.\r\nVERBOSE: Importing function 'Install-ChocolateyEnvironmentVariable'.\r\nVERBOSE: Importing function 'Install-ChocolateyExplorerMenuItem'.\r\nVERBOSE: Importing function 'Install-ChocolateyFileAssociation'.\r\nVERBOSE: Importing function 'Install-ChocolateyInstallPackage'.\r\nVERBOSE: Importing function 'Install-ChocolateyPackage'.\r\nVERBOSE: Importing function 'Install-ChocolateyPath'.\r\nVERBOSE: Importing function 'Install-ChocolateyPinnedTaskBarItem'.\r\nVERBOSE: Importing function 'Install-ChocolateyPowershellCommand'.\r\nVERBOSE: Importing function 'Install-ChocolateyShortcut'.\r\nVERBOSE: Importing function 'Install-ChocolateyVsixPackage'.\r\nVERBOSE: Importing function 'Install-ChocolateyZipPackage'.\r\nVERBOSE: Importing function 'Install-Vsix'.\r\nVERBOSE: Importing function 'Register-Application'.\r\nVERBOSE: Importing function 'Set-EnvironmentVariable'.\r\nVERBOSE: Importing function 'Set-PowerShellExitCode'.\r\nVERBOSE: Importing function 'Start-ChocolateyProcessAsAdmin'.\r\nVERBOSE: Importing function 'Test-ProcessAdminRights'.\r\nVERBOSE: Importing function 'Uninstall-BinFile'.\r\nVERBOSE: Importing function 'Uninstall-ChocolateyEnvironmentVariable'.\r\nVERBOSE: Importing function 'Uninstall-ChocolateyPackage'.\r\nVERBOSE: Importing function 'Uninstall-ChocolateyZipPackage'.\r\nVERBOSE: Importing function 'Update-SessionEnvironment'.\r\nVERBOSE: Importing function 'Write-ChocolateyFailure'.\r\nVERBOSE: Importing function 'Write-ChocolateySuccess'.\r\nVERBOSE: Importing function 'Write-FileUpdateLog'.\r\nVERBOSE: Importing function 'Write-FunctionCallLogMessage'.\r\nVERBOSE: Importing alias 'Add-BinFile'.\r\nVERBOSE: Importing alias 'Generate-BinFile'.\r\nVERBOSE: Importing alias 'Get-InstallRegistryKey'.\r\nVERBOSE: Importing alias 'Get-OSBitness'.\r\nVERBOSE: Importing alias 'Get-ProcessorBits'.\r\nVERBOSE: Importing alias 'Invoke-ChocolateyProcess'.\r\nVERBOSE: Importing alias 'refreshenv'.\r\nVERBOSE: Importing alias 'Remove-BinFile'.\r\nVERBOSE: Importing alias 'Start-ChocolateyProcess'.\r\nWindows 10 Detected\r\nVERBOSE: GET https://www.microsoft.com//download/confirmation.aspx?id=45520 with 0-byte payload\r\nVERBOSE: received 136688-byte response of content type text/html\r\nx64 Detected\r\nDownloading RSAT 64 bit\r\n  from 'https://download.microsoft.com/download/1/D/8/1D8B5022-5477-4B9A-8104-6A71FF9D98AB/WindowsTH-RSAT_WS_1709-x64.msu'\r\n\r\nDownload of WindowsTH-RSAT_WS_1709-x64.msu (94.49 MB) completed.\r\nInstalling RSAT...\r\nWARNING: User (you) cancelled the installation.\r\nERROR: Running [\"C:\\Windows\\System32\\wusa.exe\" \"C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\RSAT\\2.1\\WindowsTH-RSAT_WS_1709-x64.msu\" /quiet /norestart ] was not successful. Exit code was '5'. Exit code indicates the following: User (you) cancelled the installation..\r\nThe install of rsat was NOT successful.\r\nError while running 'C:\\ProgramData\\chocolatey\\lib\\RSAT\\tools\\chocolateyinstall.ps1'.\r\n See log for details.\r\n\r\nChocolatey installed 0/1 packages. 1 packages failed.\r\n See the log for details (C:\\ProgramData\\chocolatey\\logs\\chocolatey.log).\r\n\r\nFailures\r\n - rsat (exited 5) - Error while running 'C:\\ProgramData\\chocolatey\\lib\\RSAT\\tools\\chocolateyinstall.ps1'.\r\n See log for details.\r\n",
    "stdout_lines": [
        "Chocolatey v0.10.10",
        "Installing the following packages:",
        "rsat",
        "By installing you accept licenses for the packages.",
        "[NuGet] Installing 'RSAT 2.1'.",
        "[NuGet] Successfully installed 'RSAT 2.1'.",
        "",
        "RSAT v2.1 [Approved]",
        "rsat package files install completed. Performing other installation steps.",
        "VERBOSE: Exporting function 'Format-FileSize'.",
        "VERBOSE: Exporting function 'Get-ChecksumValid'.",
        "VERBOSE: Exporting function 'Get-ChocolateyUnzip'.",
        "VERBOSE: Exporting function 'Get-ChocolateyWebFile'.",
        "VERBOSE: Exporting function 'Get-EnvironmentVariable'.",
        "VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.",
        "VERBOSE: Exporting function 'Get-FtpFile'.",
        "VERBOSE: Exporting function 'Get-OSArchitectureWidth'.",
        "VERBOSE: Exporting function 'Get-PackageParameters'.",
        "VERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.",
        "VERBOSE: Exporting function 'Get-ToolsLocation'.",
        "VERBOSE: Exporting function 'Get-UACEnabled'.",
        "VERBOSE: Exporting function 'Get-UninstallRegistryKey'.",
        "VERBOSE: Exporting function 'Get-VirusCheckValid'.",
        "VERBOSE: Exporting function 'Get-WebFile'.",
        "VERBOSE: Exporting function 'Get-WebFileName'.",
        "VERBOSE: Exporting function 'Get-WebHeaders'.",
        "VERBOSE: Exporting function 'Install-BinFile'.",
        "VERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.",
        "VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.",
        "VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.",
        "VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.",
        "VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPackage'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPath'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.",
        "VERBOSE: Exporting function 'Install-ChocolateyShortcut'.",
        "VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.",
        "VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.",
        "VERBOSE: Exporting function 'Install-Vsix'.",
        "VERBOSE: Exporting function 'Set-EnvironmentVariable'.",
        "VERBOSE: Exporting function 'Set-PowerShellExitCode'.",
        "VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.",
        "VERBOSE: Exporting function 'Test-ProcessAdminRights'.",
        "VERBOSE: Exporting function 'Uninstall-BinFile'.",
        "VERBOSE: Exporting function 'Uninstall-ChocolateyEnvironmentVariable'.",
        "VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.",
        "VERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.",
        "VERBOSE: Exporting function 'Update-SessionEnvironment'.",
        "VERBOSE: Exporting function 'Write-ChocolateyFailure'.",
        "VERBOSE: Exporting function 'Write-ChocolateySuccess'.",
        "VERBOSE: Exporting function 'Write-FileUpdateLog'.",
        "VERBOSE: Exporting function 'Write-FunctionCallLogMessage'.",
Using module file /Users/tanner/projects/ansible.git/ansible/lib/ansible/modules/windows/win_chocolatey.ps1
        "VERBOSE: Exporting alias 'Get-ProcessorBits'.",
        "VERBOSE: Exporting alias 'Get-OSBitness'.",
        "VERBOSE: Exporting alias 'Get-InstallRegistryKey'.",
        "VERBOSE: Exporting alias 'Generate-BinFile'.",
        "VERBOSE: Exporting alias 'Add-BinFile'.",
        "VERBOSE: Exporting alias 'Start-ChocolateyProcess'.",
        "VERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.",
        "VERBOSE: Exporting alias 'Remove-BinFile'.",
        "VERBOSE: Exporting alias 'refreshenv'.",
        "VERBOSE: Loading module from path 'C:\\ProgramData\\chocolatey\\extensions\\chocolatey-core\\chocolatey-core.psm1'.",
        "VERBOSE: Exporting function 'Get-UninstallRegistryKey'.",
        "VERBOSE: Exporting function 'Get-AppInstallLocation'.",
        "VERBOSE: Exporting function 'Get-AvailableDriveLetter'.",
        "VERBOSE: Exporting function 'Get-EffectiveProxy'.",
        "VERBOSE: Exporting function 'Get-PackageCacheLocation'.",
        "VERBOSE: Exporting function 'Get-PackageParameters'.",
        "VERBOSE: Exporting function 'Get-WebContent'.",
        "VERBOSE: Exporting function 'Register-Application'.",
        "VERBOSE: Importing function 'Get-AppInstallLocation'.",
        "VERBOSE: Importing function 'Get-AvailableDriveLetter'.",
        "VERBOSE: Importing function 'Get-EffectiveProxy'.",
        "VERBOSE: Importing function 'Get-PackageCacheLocation'.",
        "VERBOSE: Importing function 'Get-PackageParameters'.",
        "VERBOSE: Importing function 'Get-UninstallRegistryKey'.",
        "VERBOSE: Importing function 'Get-WebContent'.",
        "VERBOSE: Importing function 'Register-Application'.",
        "VERBOSE: Exporting function 'Format-FileSize'.",
EXEC (via pipeline wrapper)
        "VERBOSE: Exporting function 'Get-ChecksumValid'.",
        "VERBOSE: Exporting function 'Get-ChocolateyUnzip'.",
        "VERBOSE: Exporting function 'Get-ChocolateyWebFile'.",
        "VERBOSE: Exporting function 'Get-EnvironmentVariable'.",
        "VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.",
        "VERBOSE: Exporting function 'Get-FtpFile'.",
        "VERBOSE: Exporting function 'Get-OSArchitectureWidth'.",
        "VERBOSE: Exporting function 'Get-PackageParameters'.",
        "VERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.",
        "VERBOSE: Exporting function 'Get-ToolsLocation'.",
        "VERBOSE: Exporting function 'Get-UACEnabled'.",
        "VERBOSE: Exporting function 'Get-UninstallRegistryKey'.",
        "VERBOSE: Exporting function 'Get-VirusCheckValid'.",
        "VERBOSE: Exporting function 'Get-WebFile'.",
        "VERBOSE: Exporting function 'Get-WebFileName'.",
        "VERBOSE: Exporting function 'Get-WebHeaders'.",
        "VERBOSE: Exporting function 'Install-BinFile'.",
        "VERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.",
        "VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.",
        "VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.",
        "VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.",
        "VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPackage'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPath'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.",
        "VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.",
        "VERBOSE: Exporting function 'Install-ChocolateyShortcut'.",
        "VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.",
        "VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.",
        "VERBOSE: Exporting function 'Install-Vsix'.",
        "VERBOSE: Exporting function 'Set-EnvironmentVariable'.",
        "VERBOSE: Exporting function 'Set-PowerShellExitCode'.",
        "VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.",
        "VERBOSE: Exporting function 'Test-ProcessAdminRights'.",
        "VERBOSE: Exporting function 'Uninstall-BinFile'.",
        "VERBOSE: Exporting function 'Uninstall-ChocolateyEnvironmentVariable'.",
        "VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.",
        "VERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.",
        "VERBOSE: Exporting function 'Update-SessionEnvironment'.",
        "VERBOSE: Exporting function 'Write-ChocolateyFailure'.",
        "VERBOSE: Exporting function 'Write-ChocolateySuccess'.",
        "VERBOSE: Exporting function 'Write-FileUpdateLog'.",
        "VERBOSE: Exporting function 'Write-FunctionCallLogMessage'.",
        "VERBOSE: Exporting function 'Get-AppInstallLocation'.",
        "VERBOSE: Exporting function 'Get-AvailableDriveLetter'.",
        "VERBOSE: Exporting function 'Get-EffectiveProxy'.",
        "VERBOSE: Exporting function 'Get-PackageCacheLocation'.",
        "VERBOSE: Exporting function 'Get-WebContent'.",
        "VERBOSE: Exporting function 'Register-Application'.",
        "VERBOSE: Exporting alias 'Get-ProcessorBits'.",
        "VERBOSE: Exporting alias 'Get-OSBitness'.",
        "VERBOSE: Exporting alias 'Get-InstallRegistryKey'.",
        "VERBOSE: Exporting alias 'Generate-BinFile'.",
        "VERBOSE: Exporting alias 'Add-BinFile'.",
        "VERBOSE: Exporting alias 'Start-ChocolateyProcess'.",
        "VERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.",
        "VERBOSE: Exporting alias 'Remove-BinFile'.",
        "VERBOSE: Exporting alias 'refreshenv'.",
        "VERBOSE: Importing function 'Format-FileSize'.",
        "VERBOSE: Importing function 'Get-AppInstallLocation'.",
        "VERBOSE: Importing function 'Get-AvailableDriveLetter'.",
        "VERBOSE: Importing function 'Get-ChecksumValid'.",
        "VERBOSE: Importing function 'Get-ChocolateyUnzip'.",
        "VERBOSE: Importing function 'Get-ChocolateyWebFile'.",
        "VERBOSE: Importing function 'Get-EffectiveProxy'.",
        "VERBOSE: Importing function 'Get-EnvironmentVariable'.",
        "VERBOSE: Importing function 'Get-EnvironmentVariableNames'.",
        "VERBOSE: Importing function 'Get-FtpFile'.",
        "VERBOSE: Importing function 'Get-OSArchitectureWidth'.",
        "VERBOSE: Importing function 'Get-PackageCacheLocation'.",
        "VERBOSE: Importing function 'Get-PackageParameters'.",
        "VERBOSE: Importing function 'Get-PackageParametersBuiltIn'.",
        "VERBOSE: Importing function 'Get-ToolsLocation'.",
        "VERBOSE: Importing function 'Get-UACEnabled'.",
        "VERBOSE: Importing function 'Get-UninstallRegistryKey'.",
        "VERBOSE: Importing function 'Get-VirusCheckValid'.",
        "VERBOSE: Importing function 'Get-WebContent'.",
        "VERBOSE: Importing function 'Get-WebFile'.",
        "VERBOSE: Importing function 'Get-WebFileName'.",
        "VERBOSE: Importing function 'Get-WebHeaders'.",
        "VERBOSE: Importing function 'Install-BinFile'.",
        "VERBOSE: Importing function 'Install-ChocolateyDesktopLink'.",
        "VERBOSE: Importing function 'Install-ChocolateyEnvironmentVariable'.",
        "VERBOSE: Importing function 'Install-ChocolateyExplorerMenuItem'.",
        "VERBOSE: Importing function 'Install-ChocolateyFileAssociation'.",
        "VERBOSE: Importing function 'Install-ChocolateyInstallPackage'.",
        "VERBOSE: Importing function 'Install-ChocolateyPackage'.",
        "VERBOSE: Importing function 'Install-ChocolateyPath'.",
        "VERBOSE: Importing function 'Install-ChocolateyPinnedTaskBarItem'.",
        "VERBOSE: Importing function 'Install-ChocolateyPowershellCommand'.",
        "VERBOSE: Importing function 'Install-ChocolateyShortcut'.",
        "VERBOSE: Importing function 'Install-ChocolateyVsixPackage'.",
        "VERBOSE: Importing function 'Install-ChocolateyZipPackage'.",
        "VERBOSE: Importing function 'Install-Vsix'.",
        "VERBOSE: Importing function 'Register-Application'.",
        "VERBOSE: Importing function 'Set-EnvironmentVariable'.",
        "VERBOSE: Importing function 'Set-PowerShellExitCode'.",
        "VERBOSE: Importing function 'Start-ChocolateyProcessAsAdmin'.",
        "VERBOSE: Importing function 'Test-ProcessAdminRights'.",
        "VERBOSE: Importing function 'Uninstall-BinFile'.",
        "VERBOSE: Importing function 'Uninstall-ChocolateyEnvironmentVariable'.",
        "VERBOSE: Importing function 'Uninstall-ChocolateyPackage'.",
        "VERBOSE: Importing function 'Uninstall-ChocolateyZipPackage'.",
        "VERBOSE: Importing function 'Update-SessionEnvironment'.",
        "VERBOSE: Importing function 'Write-ChocolateyFailure'.",
        "VERBOSE: Importing function 'Write-ChocolateySuccess'.",
        "VERBOSE: Importing function 'Write-FileUpdateLog'.",
        "VERBOSE: Importing function 'Write-FunctionCallLogMessage'.",
        "VERBOSE: Importing alias 'Add-BinFile'.",
        "VERBOSE: Importing alias 'Generate-BinFile'.",
        "VERBOSE: Importing alias 'Get-InstallRegistryKey'.",
        "VERBOSE: Importing alias 'Get-OSBitness'.",
        "VERBOSE: Importing alias 'Get-ProcessorBits'.",
        "VERBOSE: Importing alias 'Invoke-ChocolateyProcess'.",
        "VERBOSE: Importing alias 'refreshenv'.",
        "VERBOSE: Importing alias 'Remove-BinFile'.",
        "VERBOSE: Importing alias 'Start-ChocolateyProcess'.",
        "Windows 10 Detected",
        "VERBOSE: GET https://www.microsoft.com//download/confirmation.aspx?id=45520 with 0-byte payload",
        "VERBOSE: received 136688-byte response of content type text/html",
        "x64 Detected",
        "Downloading RSAT 64 bit",
        "  from 'https://download.microsoft.com/download/1/D/8/1D8B5022-5477-4B9A-8104-6A71FF9D98AB/WindowsTH-RSAT_WS_1709-x64.msu'",
        "",
        "Download of WindowsTH-RSAT_WS_1709-x64.msu (94.49 MB) completed.",
        "Installing RSAT...",
        "WARNING: User (you) cancelled the installation.",
        "ERROR: Running [\"C:\\Windows\\System32\\wusa.exe\" \"C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\RSAT\\2.1\\WindowsTH-RSAT_WS_1709-x64.msu\" /quiet /norestart ] was not successful. Exit code was '5'. Exit code indicates the following: User (you) cancelled the installation..",
        "The install of rsat was NOT successful.",
        "Error while running 'C:\\ProgramData\\chocolatey\\lib\\RSAT\\tools\\chocolateyinstall.ps1'.",
        " See log for details.",
        "",
        "Chocolatey installed 0/1 packages. 1 packages failed.",
        " See the log for details (C:\\ProgramData\\chocolatey\\logs\\chocolatey.log).",
        "",
        "Failures",
        " - rsat (exited 5) - Error while running 'C:\\ProgramData\\chocolatey\\lib\\RSAT\\tools\\chocolateyinstall.ps1'.",
        " See log for details."
    ]
}

gist of the above

@ansibot

This comment has been minimized.

Show comment
Hide comment
@ansibot

ansibot Apr 26, 2018

Contributor

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

Contributor

ansibot commented Apr 26, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@jborean93

This comment has been minimized.

Show comment
Hide comment
@jborean93

jborean93 Apr 26, 2018

Contributor

Is This A Bug?

Hi!

Thanks very much for your submission to Ansible. It sincerely means a lot to us.

We're not sure this is a bug, and we don't mean for this to be confrontational. Let's explain what we're thinking:

  • The error indicates it is trying to install an msu (windows update) which doesn't work over native WinRM
  • You need to use become on the win_chocolatey task to bypass the WinRM restriction, e.g.
- name: Install programs (choco)
  win_chocolatey:
    name: rsat
    state: present
  become: yes
  becom_method: runas
  become_user: SYSTEM

As such, we're going to close this ticket. However, we're open to being corrected, should you wish to discuss. You can stop by one of our two mailing lists
to talk about this and we might be persuaded otherwise.

Comments on closed tickets aren't something we monitor, so if you do disagree with this, a mailing list thread is probably appropriate.

Thank you once again for this and your interest in Ansible!

Contributor

jborean93 commented Apr 26, 2018

Is This A Bug?

Hi!

Thanks very much for your submission to Ansible. It sincerely means a lot to us.

We're not sure this is a bug, and we don't mean for this to be confrontational. Let's explain what we're thinking:

  • The error indicates it is trying to install an msu (windows update) which doesn't work over native WinRM
  • You need to use become on the win_chocolatey task to bypass the WinRM restriction, e.g.
- name: Install programs (choco)
  win_chocolatey:
    name: rsat
    state: present
  become: yes
  becom_method: runas
  become_user: SYSTEM

As such, we're going to close this ticket. However, we're open to being corrected, should you wish to discuss. You can stop by one of our two mailing lists
to talk about this and we might be persuaded otherwise.

Comments on closed tickets aren't something we monitor, so if you do disagree with this, a mailing list thread is probably appropriate.

Thank you once again for this and your interest in Ansible!

@jborean93 jborean93 closed this Apr 26, 2018

@mkrizek mkrizek removed the needs_triage label Apr 27, 2018

@basictheprogram

This comment has been minimized.

Show comment
Hide comment
@basictheprogram

basictheprogram May 4, 2018

I'd like to re-open this issue. I've tried multiple ways of getting this to work and all evidence says Ansible 2.6.0 devel branch doesn't work as documented.

This is being discussed here and here in the Ansible Project group.

$ ansible --version
ansible 2.6.0 (devel 1c4448666e) last updated 2018/05/04 12:29:36 (GMT -500)
  config file = None
  configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible
  executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible
  python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
$ kinit Administrator@CORP
Administrator@CORP's password:
chocolatey_msu:
  - rsat

- name: Install msu (choco)
  win_chocolatey:
    name: "{{ item }}"
    state: "present"
  when:
    - chocolatey_msu is defined
  with_items:
      - "{{ chocolatey_msu }}"
  become: yes
  become_method: runas
  become_user: SYSTEM
  tags: win_chocolatey
TASK [win_chocolatey : Install msu (choco)] ************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was:     + FullyQualifiedErrorId : Win32Exception
failed: [surface02.corp] (item=rsat) => {"changed": false, "item": "rsat", "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 1326)\""}

The full traceback is:
Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The user name or password is incorrect,
Win32ErrorCode 1326)"
At line:1083 char:9
+         $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception


failed: [surface02.corp] (item=rsat) => {
    "changed": false,
    "item": "rsat",
    "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 1326)\""
}
- win_shell: cmd.exe /c whoami && whoami /groups && whoami /priv
  become: yes
  become_user: System
  tags: win_chocolatey2
The full traceback is:
Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The user name or password is incorrect,
Win32ErrorCode 1326)"
At line:1083 char:9
+         $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception


fatal: [surface02.corp]: FAILED! => {
    "changed": false,
    "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 1326)\""
}

Let me know if I should open a new issue.

Thanks.

basictheprogram commented May 4, 2018

I'd like to re-open this issue. I've tried multiple ways of getting this to work and all evidence says Ansible 2.6.0 devel branch doesn't work as documented.

This is being discussed here and here in the Ansible Project group.

$ ansible --version
ansible 2.6.0 (devel 1c4448666e) last updated 2018/05/04 12:29:36 (GMT -500)
  config file = None
  configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible
  executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible
  python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
$ kinit Administrator@CORP
Administrator@CORP's password:
chocolatey_msu:
  - rsat

- name: Install msu (choco)
  win_chocolatey:
    name: "{{ item }}"
    state: "present"
  when:
    - chocolatey_msu is defined
  with_items:
      - "{{ chocolatey_msu }}"
  become: yes
  become_method: runas
  become_user: SYSTEM
  tags: win_chocolatey
TASK [win_chocolatey : Install msu (choco)] ************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was:     + FullyQualifiedErrorId : Win32Exception
failed: [surface02.corp] (item=rsat) => {"changed": false, "item": "rsat", "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 1326)\""}

The full traceback is:
Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The user name or password is incorrect,
Win32ErrorCode 1326)"
At line:1083 char:9
+         $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception


failed: [surface02.corp] (item=rsat) => {
    "changed": false,
    "item": "rsat",
    "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 1326)\""
}
- win_shell: cmd.exe /c whoami && whoami /groups && whoami /priv
  become: yes
  become_user: System
  tags: win_chocolatey2
The full traceback is:
Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The user name or password is incorrect,
Win32ErrorCode 1326)"
At line:1083 char:9
+         $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception


fatal: [surface02.corp]: FAILED! => {
    "changed": false,
    "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 1326)\""
}

Let me know if I should open a new issue.

Thanks.

@jborean93

This comment has been minimized.

Show comment
Hide comment
@jborean93

jborean93 May 4, 2018

Contributor

For anyone following along, this is not an issue with Ansible, see https://groups.google.com/forum/#!topic/ansible-project/PQ9cfJUrRMY for the details.

Contributor

jborean93 commented May 4, 2018

For anyone following along, this is not an issue with Ansible, see https://groups.google.com/forum/#!topic/ansible-project/PQ9cfJUrRMY for the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment