当我尝试通过 WinRM 模块连接到我的 Windows 主机时,我在 Ansible 中收到“连接被拒绝”的错误消息。
\n\nansible目录结构如下:
\n\n命令:
\n\nuser@ansible:~/git/ansible-test$ ansible-playbook test.yml -i inventories/hosts \n\nPLAY [install vm] ***************************************************************************************************************************************************************************\n\nTASK [Gathering Facts] ***********************************************************************************************************************************************************************\nfatal: [10.10.10.10]: UNREACHABLE! => {"changed": false, "msg": "ssl: HTTPSConnectionPool(host=\'10.10.10.10\', port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError(\'<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6298184d50>: Failed to establish a new connection: [Errno 111] Connection refused\',))", "unreachable": true}\n to retry, use: --limit @/home/user/git/ansible-test/test.retry\n\nPLAY RECAP ***********************************************************************************************************************************************************************************\n10.10.10.10 : ok=0 changed=0 unreachable=1 failed=0 \nRun Code Online (Sandbox Code Playgroud)\n\nansible-test 直接层次结构:
\n\nansible-test$ tree\n.\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 group_vars\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 all\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 inventories\n\xe2\x94\x82\xc2\xa0\xc2\xa0 …Run Code Online (Sandbox Code Playgroud)