Ansible WinRM 问题 ( "msg" : "the connection plugin 'winrm ## The kind of connection which ansible wi



我从linux连接到windows服务器时得到以下错误消息。我已经安装了pywinrm模块。但仍然得到错误消息。有人知道这个问题吗?TIA

Telnet在5985和5986上工作

致命:[10.10.X。X]:失败!=比;{"msg": "连接插件'winrm ##与远程窗口节点建立的连接类型'未找到"}

ansible 2.9.23配置文件=/etc/ansible/ansible.cfg配置模块搜索路径= [u'/home/ec2-user/]。ansible/插件/模块",你"/usr/share/ansible/插件/模块的)Ansible python模块位置=/usr/lib/python2.7/site-packages/Ansible可执行位置=/usr/bin/ansiblepython version = 2.7.18 (default, May 25 2022, 14:30:51) [GCC 7.3.1 20180712 (Red Hat 7.3.1-15)]

在为主机定义连接类型的地方(可能是目录文件的主机变量部分),在与连接类型标识符相同的行上有注释。这是无效的,Ansible盲目地使用整行,包括注释:winrm ## The kind of connection which ansible will make with remote windows node作为连接类型插件名-这是不存在的。您需要的是插件名称winrm

修改:

ansible_connection=winrm ## The kind of connection…

:

ansible_connection=winrm

如果你的主机变量是在YAML文件中定义的,上面的内容将类似。

你可以保留注释,但它需要在单独的行中以#开头。

相关内容

最新更新