Skip to content
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

win_chocolatey errors when upgrading powershell #21873

Closed
basictheprogram opened this issue Feb 23, 2017 · 11 comments
Closed

win_chocolatey errors when upgrading powershell #21873

basictheprogram opened this issue Feb 23, 2017 · 11 comments
Assignees
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug. module This issue/PR relates to a module. windows Windows community

Comments

@basictheprogram
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_chocolatey

ANSIBLE VERSION
$ ansible --version
ansible 2.3.0 (devel 01436cf186) last updated 2017/02/21 12:05:34 (GMT -500)
  config file =
  configured module search path = Default w/o overrides
CONFIGURATION

Ansible configuration from git clone

OS / ENVIRONMENT

Control host macOS 10.12.3
Managed host Windows 7

SUMMARY

Attempting to upgrade powershell4 to powershell5 using the win_chocolatey module.

STEPS TO REPRODUCE
- name: install powershell5
  win_chocolatey:
    name: '{{ item }}'
    state: 'present'
  with_items:
    - "powershell"
  register: check_powershell5
  when: "{{ ansible_PSVersionTable.Major|int < 5 }}"
  tags: chocolatey
EXPECTED RESULTS

Upgrade/install of powershell5

ACTUAL RESULTS

Ansible/win_chocolatey error out.

https://gist.github.com/basictheprogram/018789574e04104932c002777e5a3a76

@ansibot
Copy link
Contributor

ansibot commented Feb 23, 2017

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. windows Windows community labels Feb 23, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Feb 24, 2017
@dagwieers
Copy link
Contributor

Error output from dump:

Elevating Permissions and running [\"C:\\windows\\System32\\wusa.exe\" C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\PowerShell\\5.1.14409.20170214\\PowerShellInstall.MSU /quiet /norestart /log:\"C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\PowerShell.Install.evtx\" ].
This may take a while, depending on the statements.
Setting RunAs for elevation
Command [\"C:\\windows\\System32\\wusa.exe\" C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\PowerShell\\5.1.14409.20170214\\PowerShellInstall.MSU /quiet /norestart /log:\"C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\PowerShell.Install.evtx\" ] exited with '5'.
ERROR: Running [\"C:\\windows\\System32\\wusa.exe\" C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\PowerShell\\5.1.14409.20170214\\PowerShellInstall.MSU /quiet /norestart /log:\"C:\\Users\\Administrator\\AppData\\Local\\Temp\\chocolatey\\PowerShell.Install.evtx\" ] was not successful.
Exit code was '5'. See log for possible error messages.

@basictheprogram I guess we will need to have the content of that log-file to understand what was happening.

needs_info

@ansibot
Copy link
Contributor

ansibot commented Mar 21, 2017

@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Mar 21, 2017
@dagwieers
Copy link
Contributor

Also, it would help if you could reproduce this with the most recent winrm and win_chocolatey changes.

@ansibot
Copy link
Contributor

ansibot commented Mar 21, 2017

@basictheprogram This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@ansibot ansibot added needs_info This issue requires further information. Please answer any outstanding questions. and removed needs_info This issue requires further information. Please answer any outstanding questions. labels Mar 21, 2017
@basictheprogram
Copy link
Author

I cannot duplicate this issue with:

$ ansible --version
ansible 2.4.0 (devel cc50b803df) last updated 2017/03/22 14:15:18 (GMT -500)
  config file =
  configured module search path = Default w/o overrides
  python version = 2.7.10 (default, Jul 30 2016, 19:40:32) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]

and

pywinrm==0.2.2

@dagwieers
Copy link
Contributor

At 19:00 UTC this ticket will be processed during the first Windows Sprint, we would appreciate if you could join the Sprint to help out with fixing/closing this issue.

@dagwieers
Copy link
Contributor

@basictheprogram So I guess we can close this issue then ?

@dagwieers
Copy link
Contributor

bug_resolved

@ansibot
Copy link
Contributor

ansibot commented Jul 17, 2017

@jhawkesworth
Copy link
Contributor

Closing issue as OP has stated above issue no longer reproducible in latest devel.

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug. module This issue/PR relates to a module. windows Windows community
Projects
None yet
Development

No branches or pull requests

6 participants