1

I'm probably trying to do something stupid, but I have been writing roles to install applications via WinGet (Windows package manager) and via ansible.windows.win_command. I am on WSL2 (Ubuntu) connecting to Windows 10 on the same computer. This is working for the most part, but some roles are returning error which I think I have fixed with ignore_errors: yes.

However, I think some are launching error dialogs even when running WinGet in silent mode and as the application installer is waiting on user input, the task never completes. Should I use async and poll or what can I do? I am mostly interested in having as many applications installed via WinGet via Ansible until there is WinGet support. If a role fails I can install via WinGet manually, but I want the playbook with all the roles to run to the end at least.

Viktor
  • 487
  • 2
  • 8
  • 26
  • It looks like an issue was created to support the Windows Package Manager in Ansible. https://github.com/ansible-collections/community.windows/issues/89 – Demitrius Nelon Apr 20 '22 at 21:59
  • @Suirtimed Yeah, I know, but thanks! I've been F5:ing that issue for quite sometime now. Maybe soon I'll be forced to continue on the PR without knowing anything about Ansible module or PowerShell development. :D – Viktor Apr 22 '22 at 19:06

1 Answers1

1

You may be getting hit by the dialog to accept source agreements or package agreements.

You can either pass the flags as suggested or you could try the EXPECT module.

Demitrius Nelon
  • 1,210
  • 1
  • 10
  • 29