Ansible Pilot

Ansible troubleshooting - powershell incompatible with the sudo become plugin

PowerShell incompatible with the sudo become plugin

Ansible troubleshooting

Today we’re going to talk about Ansible troubleshooting and specifically about “the PowerShell shell family is incompatible with the sudo become plugin” error. I’m Luca Berton and welcome to today’s episode of Ansible Pilot

demo

The best way of talking about Ansible troubleshooting is to jump in a live demo to show you practically “the PowerShell shell family is incompatible with the sudo become plugin” error and how to solve it!

---
- name: win_reboot module demo
  hosts: all
  become: true
  tasks:
    - name: reboot host(s)
      ansible.windows.win_reboot:

output

$ ansible-playbook -i win/inventory troubleshooting/incompatiblesudo_error.yml
PLAY [win_reboot module demo] *********************************************************************
TASK [Gathering Facts] ****************************************************************************
fatal: [WindowsServer]: FAILED! => {"msg": "The powershell shell family is incompatible with the sudo become plugin"}
PLAY RECAP ****************************************************************************************
WindowsServer              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

--- 
- name: win_reboot module demo
  hosts: all
  become: false
  tasks:
    - name: reboot host(s)
      ansible.windows.win_reboot:

output

$ ansible-playbook -i win/inventory troubleshooting/incompatiblesudo_fix.yml
PLAY [win_reboot module demo] *********************************************************************
TASK [Gathering Facts] ****************************************************************************
ok: [WindowsServer]
TASK [reboot host(s)] *****************************************************************************
changed: [WindowsServer]
PLAY RECAP ****************************************************************************************
WindowsServer              : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

code with ❤️ in GitHub

Recap

Now you know better how to troubleshoot the error: “The PowerShell shell family is incompatible with the sudo become plugin”. Subscribe to the YouTube channel, Medium, Website and Twitter to not miss the next episode of the Ansible Pilot.

Donate

Want to keep this project going? Please donate

Follow me

Subscribe not to miss any new releases

September 28, 2021