The powershell shell family is incompatible with the sudo become plugin

485 views
Skip to first unread message

Wafi sh

unread,
Aug 4, 2020, 3:57:29 PM8/4/20
to Ansible Project
Using AWX 13.0.0 (Ansible 2.9.10)

The playbook:

-------------------------------------
- hosts: all
  name: DNS Fix Windows
  gather_facts: no

  tasks:
    - name: Check datacenter
      win_shell: |
          CODE-BLOCK
      register: datacenter

-----------------------------------

AWX error:

{
    "msg": "The powershell shell family is incompatible with the sudo become plugin",
    "_ansible_no_log": false
}



This is working on Ansible 2.9.0 without AWX.

Matt Martz

unread,
Aug 4, 2020, 4:30:48 PM8/4/20
to ansible...@googlegroups.com
This indicates you are running the playbook with become, or the inventory specifies the hosts use become.  However, you have not configured the become_method for those Windows hosts to use `runas` instead of the default `sudo`.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f7ec15e4-7785-456e-bebe-fa4b3e0388a9o%40googlegroups.com.


--
Matt Martz
@sivel
sivel.net

Wafi sh

unread,
Aug 6, 2020, 11:59:39 AM8/6/20
to Ansible Project
Thank Matt,

I have tried to add "become_method: winrm" to the group variable but the template still shows become_method: sudo when running it.
Here is the inventory group variables i'm using for the group "win_test_nce" in inventory "win-test":
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
become_method: runas


The playbook output is with verbosity:
PLAYBOOK: dns-fix-win.yml ******************************************************
Positional arguments: dns-fix-win.yml
verbosity: 4
ask_pass: True
remote_user: ccitops.admin
connection: smart
timeout: 10
become: True
become_method: sudo
tags: ('all',)
inventory: ('/tmp/awx_74_qrt3a82d/tmp3pzi6c98',)
subset: win_test_nce
extra_vars: ('@/tmp/awx_74_qrt3a82d/env/extravars',)
ask_vault_pass: True
forks: 5
1 plays in dns-fix-win.yml



On Tuesday, August 4, 2020 at 4:30:48 PM UTC-4, Matt Martz wrote:
This indicates you are running the playbook with become, or the inventory specifies the hosts use become.  However, you have not configured the become_method for those Windows hosts to use `runas` instead of the default `sudo`.

On Tue, Aug 4, 2020 at 2:57 PM Wafi sh <waf...@gmail.com> wrote:
Using AWX 13.0.0 (Ansible 2.9.10)

The playbook:

-------------------------------------
- hosts: all
  name: DNS Fix Windows
  gather_facts: no

  tasks:
    - name: Check datacenter
      win_shell: |
          CODE-BLOCK
      register: datacenter

-----------------------------------

AWX error:

{
    "msg": "The powershell shell family is incompatible with the sudo become plugin",
    "_ansible_no_log": false
}



This is working on Ansible 2.9.0 without AWX.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.

Matt Martz

unread,
Aug 6, 2020, 12:08:44 PM8/6/20
to ansible...@googlegroups.com
That verbose output you see, is telling you how `ansible-playbook` was invoked from the command line.  It does not reflect inventory variables.

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c52a88ab-5d3f-41c5-b363-22d87ada1bbdo%40googlegroups.com.

Wafi sh

unread,
Aug 6, 2020, 12:30:47 PM8/6/20
to Ansible Project
Thanks again Matt, i'm hitting a wall here, any suggestions? 
When running it from the Ansible (command line) it works perfectly, but in AWX it seems to be stuck on using sudo as become method!

Matt Martz

unread,
Aug 6, 2020, 12:47:44 PM8/6/20
to ansible...@googlegroups.com
I'd consult the IRC channel or mailing list for AWX and seek help there. This mailing list is for ansible proper, so you may not find too much in depth AWX knowledge here.


On Thu, Aug 6, 2020 at 11:31 AM Wafi sh <waf...@gmail.com> wrote:
Thanks again Matt, i'm hitting a wall here, any suggestions? 
When running it from the Ansible (command line) it works perfectly, but in AWX it seems to be stuck on using sudo as become method!

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages