2016-07-08 11 views
3

私はAnsibleウィンドウモジュールで立ち往生しています。私はちょうど私が '接続タイムアウト'可能では、どのようにWindowsホストに接続しますか?

ホストを取得machine.But窓にpingを実行しようとしています

[windows] 
192.168.1.13 

group_vars/windows.yaml

ansible_user: raja 
ansible_password: myPassword 
ansible_port: 5986 
ansible_connection: winrm 
ansible_winrm_server_cert_validation: ignore 

そして、私が実行している間:ansible windows -vvv -i hosts -m win_ping

Using /etc/ansible/ansible.cfg as config file 
<192.168.1.13> ESTABLISH WINRM CONNECTION FOR USER: raja on PORT 5986 TO 192.168.1.13 
192.168.1.13 | UNREACHABLE! => { 
"changed": false, 
"msg": "ssl: HTTPSConnectionPool(host='192.168.1.13', port=5986): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fcb12024a90>, 'Connection to 192.168.1.13 timed out. (connect timeout=30)'))", 
"unreachable": true 
} 

しかし、私はWindowsマシンを使用してpingすることができますping 192.168.1.13

答えて

9

WindowsマシンをPowerShellリモート管理用に準備する必要があります。そうしないと、接続できません。ほとんどの機能を動作させるには、少なくともPowerShell 3.0 installed(Windows 7 SP1またはWindows Server 2008 SP1以降でのみサポートされています)とthis scriptを実行する必要があります.WireRMを有効にするだけでなく、仕事への接続。

あなたは、コマンドラインから次のコマンドは、ジョブを実行する必要がありConfigureRemotingForAnsible.ps1ファイルdonwloadたら:いくつかの時点で

たpowershell.exe - ファイルConfigureRemotingForAnsible.ps1

+0

を、それを使用することが有用であり得ますバージョン管理されたリンク(https://github.com/ansible/ansible/blob/c99c3b2b5d396b2cc1d25ad9aa6816aa922ffbc7/examples/scripts/ConfigureRemotingForAnsible.ps1など)。それを超えて、私は不思議だ、Anabilitiesはこのスクリプトを自動的に実行するのだろうか?人々は通常、このスクリプトを呼び出すためにAnsible(または他のWinRMベースのツール)を使用しますか? – blong

関連する問題