Ansible Web サイトの指示に従っていますが、Windows ノードと通信しようとすると、単純な「win_ping」コマンドでまだ問題に直面しています。
アンシブル
バージョン: 1.8.2
Windows マシン
OS : Windows Server 2012 標準
Powershell : v3.0
私が得たエラー:
[root@fgr-lgchefap101 group_vars]# ansible windows -m win_ping -vvvv
<fgr-wgcitmp201> ESTABLISH WINRM CONNECTION FOR USER: devci on PORT 5986 TO fgr-wgcitmp201
<fgr-wgcitmp201> WINRM CONNECT: transport=plaintext endpoint=https://fgr-wgcitmp201:5986/wsman
<fgr-wgcitmp201> WINRM CONNECTION ERROR: 500 WinRMTransport. [Errno 8] _ssl.c:492: EOF occurred in violation of protocol
<fgr-wgcitmp201> WINRM CONNECT: transport=plaintext endpoint=http://fgr-wgcitmp201:5986/wsman
<fgr-wgcitmp201> WINRM CONNECTION ERROR: 500 WinRMTransport. Bad HTTP response returned from server. Code 503, Service Unavailable
fgr-wgcitmp201 | FAILED => 500 WinRMTransport. Bad HTTP response returned from server. Code 503, Service Unavailable
これについて助けが必要です、ありがとう。
---- 更新 ---
Windows ノードでこの powershell コマンドを起動しました。
> netsh advfirewall firewall add rule Profile=public name="Allow WinRM HTTPS" dir=in localport=5986 protocol=TCP action=allow
そして今、私は次のエラーを受け取ります
[root@fgr-lgchefap101 fadhely]# ansible windows -m win_ping -vvvv
<fgr-wgcitmp201> ESTABLISH WINRM CONNECTION FOR USER: devci on PORT 5986 TO fgr-wgcitmp201
<fgr-wgcitmp201> WINRM CONNECT: transport=plaintext endpoint=https://fgr-wgcitmp201:5986/wsman
<fgr-wgcitmp201> WINRM CONNECTION ERROR: 401 Unauthorized. basic auth failed
<fgr-wgcitmp201> WINRM CONNECT: transport=plaintext endpoint=http://fgr-wgcitmp201:5986/wsman
<fgr-wgcitmp201> WINRM CONNECTION ERROR: 500 WinRMTransport. [Errno 104] Connection reset by peer
fgr-wgcitmp201 | FAILED => 500 WinRMTransport. [Errno 104] Connection reset by peer