I tried to create a task in ansible playbook using win_powershell module but everytime I run the playbook, the task is hanging. Does anyone have a solution ? I`m pretty new to ansible.
Here is the yml file:
---
- name: notification
hosts: windows
become: false
gather_facts: false
tasks:
- name: message
ansible.windows.win_powershell:
script: |
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show('message')