ansible无法使用winrm ping主机

时间:2019-03-18 13:21:58

标签: ansible winrm

我有这个库存

[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

我正在尝试与ping通

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”:“模块失败\ n请参阅stdout / stderr了解确切错误”,         “ rc”:1     }

我尝试了2.8.0.dev02.7.9的相同问题。 不幸的是,我没有足够的Windows经验来理解这一点-有什么想法吗?

0 个答案:

没有答案