Q&A
・質問内容
ansible -mで通信確認すると、下記のエラーが返ります。
192.168.1.8 | FAILED! => {
"msg": "winrm or requests is not installed: No module named 'winrm'"
・環境構成
CentOS8
ansible-2.9.5-1.el8.noarch
python36
Windows10Pro
・現象
このコマンドを実行したところ...
ansible -m win_ping 192.168.1.8
こういう結果が返ります。
192.168.1.8 | FAILED! => {
"msg": "winrm or requests is not installed: No module named 'winrm'"
}
・/etc/ansible/hostsの中身
[test] 192.168.1.8 [windows] 192.168.1.8 [windows:vars] ansible_user=thash ansible_password="426601" ansible_port=5986 ansible_connection=winrm ansible_winrm_server_cert_validation=ignore
・Ansible側のRM設定
[root@localhost ansible]# pip3 list | grep pywinrm DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. pywinrm (0.4.1)
・ネットワークの状態
PINGは通ります。
[root@localhost ansible]# ping 192.168.1.8 PING 192.168.1.8 (192.168.1.8) 56(84) bytes of data. 64 bytes from 192.168.1.8: icmp_seq=1 ttl=128 time=3.92 ms 64 bytes from 192.168.1.8: icmp_seq=2 ttl=128 time=14.3 ms 64 bytes from 192.168.1.8: icmp_seq=3 ttl=128 time=6.97 ms
・クライアントの設定
Powerbuilderバージョン:5.1.18362.628
NetFrameworkバージョン:4.8.03752
WinRMステータス:
PS C:\work> Get-Service | Where-Object { $_.Name -eq "WinRM" } Status Name DisplayName ------ ---- ----------- Running WinRM Windows Remote Management (WS-Manag...
WinRMリスナー状態:
PS C:\work> winrm enumerate winrm/config/Listener Listener Address = * Transport = HTTP Port = 5985 Hostname Enabled = true URLPrefix = wsman CertificateThumbprint ListeningOn = 127.0.0.1, 169.254.101.35, 169.254.183.159, 169.254.229.184, 192.168.1.8, ::1, fe80::88a2:80c5:9455:6523%11, fe80::a1e4:ed16: 745:e5b8%16, fe80::bce9:b007:f646:b79f%10 Listener Address = * Transport = HTTPS Port = 5986 Hostname = WIN10 Enabled = true URLPrefix = wsman CertificateThumbprint = 7724FF9A30AFD724A231ECD6F5D3723900DAC161 ListeningOn = 127.0.0.1, 169.254.101.35, 169.254.183.159, 169.254.229.184, 192.168.1.8, ::1, fe80::88a2:80c5:9455:6523%11, fe80::a1e4:ed16: 745:e5b8%16, fe80::bce9:b007:f646:b79f%10
あなたの回答
tips
プレビュー