Hi - I’m trying to use the Ansible win_package module to install “Visual C++ Redistributable Packages for Visual Studio 2013” on a Windows Server 2022 system. The win_package execution does not produce an error, but it hangs.
Here is my task code:
- name: "Install Visual C++ Redistributable Packages for Visual Studio 2013"
ansible.windows.win_package:
path: c:\temp\vcredist_x64.exe
become: true
become_method: runas
become_user: "administrator"
After seeing the hang behavior initially, I read in Using Ansible and Windows — Ansible Community Documentation the suggestion to use ‘become’ for one issue, so I thought I’d try it for my issue, too. There was no change in behavior
I let it run for over an hour but did not see any output to ansible-playbook (run with -vvv) beyond:
TASK [install-exchange : Install Visual C++ Redistributable Packages for Visual Studio 2013] ******************************************************************
task path: /root/ecdm-ansible/ansible/roles/install-exchange/tasks/main.yml:294
Using module file /root/.ansible/collections/ansible_collections/ansible/windows/plugins/modules/win_package.ps1
Pipelining is enabled.
<myhost.com> ESTABLISH WINRM CONNECTION FOR USER: lab\Administrator on PORT 5985 TO myhost.com
EXEC (via pipeline wrapper)
Other Ansible modules run earlier in the playbook completed successfully, so I know that the basic authentication and execution machinery is functional.
I’m using:
ansible-galaxy collection list ansible.windows
/root/.ansible/collections/ansible_collections
Collection Version
ansible.windows 2.4.0
/usr/lib/python3.10/site-packages/ansible_collections
Collection Version
ansible.windows 1.14.0
b57a80c06ac8:~ #
Thoughts, please! Thanks!