ansible не может пропинговать хост с winrm - PullRequest
0 голосов
/ 18 марта 2019

У меня есть этот инвентарь

[all]
10.0.1.180

[all:vars]
ansible_user=Administrator
ansible_password='password'
ansible_connection=winrm
ansible_winrm_transport=basic
ansible_winrm_server_cert_validation=ignore

и я пытаюсь сделать ответный пинг с

ansible all -i inventory  -m ping

но я получаю сообщение об ошибке, которое я не уверен, если это я или нет

10.0.1.180 | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "module_stderr": "Exception calling \"Create\" with \"1\" 

argument(s): \"At line:4 char:21
+ def _ansiballz_main():
+                     ~
An expression was expected after '('.
At line:13 char:27
+     except (AttributeError, OSError):
+                           ~
Missing argument in parameter list.
At line:15 char:7
+     if scriptdir is not None:
+       ~
Missing '(' after 'if' in if statement.
At line:22 char:7
+     if sys.version_info < (3,):
+       ~
Missing '(' after 'if' in if statement.
At line:22 char:30
+     if sys.version_info < (3,):
+                              ~
Missing expression after ','.
At line:22 char:25
+     if sys.version_info < (3,):
+                         ~
The '<' operator is reserved for future use.
At line:24 char:32
+         MOD_DESC = ('.py', 'U', imp.PY_SOURCE)
+                                ~
Missing expression after ','.
At line:24 char:33
+         MOD_DESC = ('.py', 'U', imp.PY_SOURCE)
+                                 ~~~~~~~~~~~~~
Unexpected token 'imp.PY_SOURCE' in expression or statement.
At line:24 char:32
+         MOD_DESC = ('.py', 'U', imp.PY_SOURCE)
+                                ~
Missing closing ')' in expression.
At line:24 char:46
+         MOD_DESC = ('.py', 'U', imp.PY_SOURCE)
+                                              ~
Unexpected token ')' in expression or statement.
Not all parse errors were reported.  Correct the reported errors and try again.\"
At line:6 char:1
+ $exec_wrapper = [ScriptBlock]::Create($split_parts[0])
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ParseException

    The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command 
name, a script block, or a CommandInfo object.
At line:7 char:2
+ &$exec_wrapper
+  ~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : BadExpression

», "module_stdout": "", "msg": "MODULE FAILURE \ nСмотрите stdout / stderr для точной ошибки", "rc": 1 } * +1010 *

Я пробовал 2.8.0.dev0 и 2.7.9 с одной и той же проблемой. К сожалению, у меня недостаточно опыта работы с Windows, чтобы понять это - есть идеи?

...