Comments (1)
There's nothing we can do here, the Windows Admin Center install is bouncing the WinRM service which stops the the win_package module from reporting back it's status, in reality it actually kills the win_package module because it's a child process of the WinRM process. The docs for Install Windows Admin Center even state
Installing Windows Admin Center will restart the WinRM service, which will sever all remote PowerShells sessions
It does go onto to you can add the parameter/argument RESTART_WINRM=0
to stop that behaviour and manually bounce that service another way for Windows Admin Center to function. What you should do is reboot after a change was detected like so
- name: Install WAC
win_package:
path: C:\Users\Administrator\Downloads\WindowsAdminCenter1910.2.msi
state: present
arguments: >-
SME_PORT=443
SSL_CERTIFICATE_OPTION=generate
RESTART_WINRM=0
register: wac_install
# WAC needs to restart the WinRM service, only sane way of handling that in Ansible that uses WinRM is to use win_reboot to reboot the host
- name: Reboot after installing WAC
win_reboot:
when: wac_install is changed
I also changed the arguments from using a list to a string as the list conversion doesn't work too well for MSI packages. If reboot a host isn't viable for you then you could try and restart the WinRM service through async in a separate task. Unfortunately it won't be as stable as doing a reboot as that win_reboot action plugin handles things like the host not being reachable which is hard to do in a separate task.
from ansible.windows.
Related Issues (20)
- [Windows 11] CS1504 Failed to compile C# code HOT 11
- Error Installing Windows Server Updates with Ansible HOT 2
- Install Application with InstallAnywhere HOT 1
- win_get_url does not respect content-disposition HOT 1
- win_update failed since ansible 7.7.0 HOT 3
- win_update show different trigger in Event Viewer HOT 1
- ansible.windows.win_powershell misinterprets block scalar (string block) HOT 2
- win_package: support checksum verification HOT 2
- intermittent winrm connection failures with large hosts count HOT 8
- intermittent "unable to delete temporary file" errors HOT 9
- Win_updates fail with "Exception from HRESULT: 0x80072EE2" HOT 2
- Windows Update Module not installing any updates HOT 4
- Windows update failes due to update loop HOT 3
- win_environment : Maybe add an option to read variable content ? HOT 5
- Error during machine sid retrieval: An error (1788) occurred while enumerating the group membership. The member's SID could not be resolved. HOT 8
- Access denied after renaming windows host : Server not found in Kerberos database HOT 10
- Failed to create temporary directory when running win_template module against Windows Server 2019 HOT 10
- win_copy doesnt work when folder name has special character HOT 2
- Add account_expires functionality from the Set-LocalUser PowerShell Cmdlet HOT 2
- Using Machine credentials from AAP passed to playbook with ansible.windows.win_copy fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible.windows.