I have below code to call the puppet-agent install role, this works for Linux, but, when I use a Windows machine it is giving error for the become line.
How can I update below code for both Linux and Windows. include become for Linux and exclude become for Windows?
---
- hosts: all
become: yes
roles:
- puppet-agent
Error message
fatal: [winhost]: FAILED! => {"msg": "The powershell shell family is
incompatible with the sudo become plugin"}