Problem with ansible winrm

351 views
Skip to first unread message

steve....@urgences-sante.qc.ca

unread,
Nov 15, 2017, 10:28:58 AM11/15/17
to Ansible Project
Hi 

I try to get winrm up ans running. I have many servers (30) where is  working but some not working (5)with this message   

fatal: [Servername]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Le terme « ConvertFrom-Json » n'est pas reconnu comme nom d'applet de commande,\r\n fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du\r\n nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correc\r\nt et réessayez.\r\nAu niveau de ligne : 31 Caractère : 71\r\n+     $payload = ConvertTo-HashtableFromPsCustomObject (ConvertFrom-Json <<<<  \r\n$json_raw)\r\n    + CategoryInfo          : ObjectNotFound: (ConvertFrom-Json:String) [], Pa \r\n   rentContainsErrorRecordException\r\n    + FullyQualifiedErrorId : CommandNotFoundException\r\n \r\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}f

Excused is it in french but the essentiel message tell  the applet name wasn't recognized, Verify the syntax or if the directory exist and retry.

The connection to the winrm is done (verified in the event viewer), i think the problem was with the creation of the directory.

Any tips , tricks or something was appreciated. I search for a few day now    

steve....@urgences-sante.qc.ca

unread,
Nov 15, 2017, 10:37:20 AM11/15/17
to Ansible Project
Any tips , tricks or something will be appreciated. I search for a few day now    

Jordan Borean

unread,
Nov 15, 2017, 2:16:03 PM11/15/17
to Ansible Project
Make sure you meet the requirements for Ansible as documented here http://docs.ansible.com/ansible/devel/windows_setup.html#host-requirements. It requires at least PowerShell v3 which is when the ConvertTo-Json cmdlet was added.

steve....@urgences-sante.qc.ca

unread,
Nov 16, 2017, 7:27:36 AM11/16/17
to Ansible Project
Thank you Jordan 

It was the problem for a few server and the firewall rules for some another server.  
Reply all
Reply to author
Forward
0 new messages