ANSIBALLZ_WRAPPER is not recognized as the name \r\nof a cmdlet

Hi,

I’m trying to run some integration tests from ubuntu against a windows10 host with

./ansible-test windows-integration -v win_xml --allow-destructive

Test tasks starts but it complains

fatal: [windows10]: FAILED! => {“msg”: "winrm send_input failed; \nstdout: Unable to initialize device PRN\r\nUnable to initialize device PRN\r\nUnable to initialize device PRN\r\n\nstderr ANSIBALLZ_WRAPPER : The term ‘ANSIBALLZ_WRAPPER’ is not recognized as the name \r\nof a cmdlet, function, script file, or operable program.

I haven’t been able to find what this wrapper is about

Any clue?

This looks like the module is being run via powershell but it’s being treated as a new-style python module (which is wrapped in a python wrapper script before being executed on the remote machine). What is this win_xml module you’re trying to test? Maybe it’s not being recognized as a powershell script?

-Toshio

The win_xml module lives in a forked repo and has been pending to be merged for some months https://github.com/ansible/ansible/pull/26404.

I'm using it in my deployments and I was considering continuing the original work to see if it can be merged.

It is a PS module but with what you have said I will check if it something is not correctly defined.

Maybe I haven't initialized the test appropriately as I was trying to use the xml modules test to unify test criteria.

Are you able to share your test/integration/inventory.winrm file as it seems like some of the config is breaking the winrm/powershell plugins. Here is an example one that I use

`
[2016]
SERVER2016.domain.local

[windows:children]
2016

[windows:vars]
ansible_user=vagrant-domain@DOMAIN.LOCAL
ansible_password=password
ansible_connection=winrm
ansible_port=5986
ansible_winrm_transport=kerberos
ansible_winrm_server_cert_validation=ignore

[localhost]
127.0.0.1 ansible_connection=local

[winrm:children]
windows

[testhost_binary_modules:children]
windows
`

I’m no expert on XML but I believe the API that was being used in the module wasn’t as fully featured as the XPath option in PowerShell and it’s little support for namespaces may cause issues down the line.

Thanks

Jordan

Your help is really appreciated and it’s helping me understand better how the testing framework works.

It ended up being my fault (what else) I confused the include tests tasks and it was doing the setup with the copy instead of win_copy command.

Maybe the test runner is forcing everything to go through PS as I was not able to see at first sight that I was trying to execute a python command.

Thanks

No worries, when you run the windows-integration tests it will load the inventory file I mentioned. You can’t use Python modules on Windows hosts as it will either fail with a send input error or the one you see with ANSIBALLZ.

Glad you got it working though, good luck with the testing.

Thanks

Jordan