AWX 1.0.6.15/41 : win_ping module FAILED ntlm code 403

Hi,

My goal is to use AWX to do some actions on Windows servers (in a big company).

From the command line I can ping my test server with the win_ping module from my Ubuntu VM (18.04) with the Ansible package (v2.8.3).

In the “inventories” directory, I have this :

Local Ubuntu 18.04 + ansible 2.83
/inventories
—inventory.inv (file)
—/group_vars (directory)
------windows.yml (file)

File inventory.inv :
[windows]
Mywindows_Host (<= this is an example!)

File windows.yml :
ansible_user: user
ansible_password: password
ansible_port: 5985
ansible_winrm_transport: ntlm
ansible_connection: winrm
ansible_winrm_message_encryption: always
ansible_winrm_server_cert_validation: ignore

When I ping this windows host from my local Ubuntu with Ansible 2.8.3 using the command line there is no problem.

$> ansible windows -m win_ping -i inventories/

Mywindows_Host | SUCCESS => {
“changed”: false,
“ping”: “pong”
}

But the same conf in AWX, I have an error…

Configuration in AWX :

  • Credential : type MACHINE + user and password like in windows.yml file
  • Inventory : create an inventory with the host name and in “Variables” section I put this :
    ansible_port: 5985
    ansible_winrm_transport: ntlm
    ansible_connection: winrm
    ansible_winrm_message_encryption: always
    ansible_winrm_server_cert_validation: ignore
    (see attach file)

But when I run win_ping command from AWX I have this error :
{
“msg”: “ntlm: Bad HTTP response returned from server. Code 403”,
“unreachable”: true,
“changed”: false
}

( https://github.com/ansible/awx/issues/4416 )

Thanks for your help
I know I have a very old version but we try to implement AWX in a large company and in higher versions there is always something that does not work or cannot be upgraded with existing data…