Connecting to Windows host fails

閲覧: 476 回
最初の未読メッセージにスキップ

JayB

未読、
2016/09/29 12:41:572016/09/29
To: Ansible Project
Hi Guys,

I'm new to Ansible. I'm trying to connect to ansible windows host. I have configured for windows by following the link (http://darrylcauldwell.com/how-to-setup-an-ansible-test-lab-for-windows-managed-nodes-custom-windows-modules/). Now, I'm not able to ping the windows server and getting the below error.

# ansible windows -i hosts -m win_ping
10.20.10.179 | FAILED! => {
    "failed": true,
    "msg": "ssl: 'Session' object has no attribute 'merge_environment_settings'"

My intention to copy a file from my Ubuntu Ansible Controller machine and run the file on Windows host. Can anyone suggest me on this?

Matt Davis

未読、
2016/09/29 17:27:272016/09/29
To: Ansible Project
You've got an old version of requests that's probably owned by an OS package (IIRC Ubuntu 14.04 has this issue out of the box). pip won't uninstall OS-owned packages, even though pywinrm declares it requires it.

You can usually fix this with:

pip install "requests>=2.10.0"

JayB

未読、
2016/09/30 4:53:332016/09/30
To: Ansible Project
Hi Matt,

I have followed the same but I'm still getting the same error. Please find the result below:

root@use-ansiblepoc:/etc/ansible# pip install "requests>=2.10.0"
Downloading/unpacking requests>=2.10.0
  Downloading requests-2.11.1-py2.py3-none-any.whl (514kB): 514kB downloaded
Installing collected packages: requests
  Found existing installation: requests 2.2.1
    Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
root@use-ansiblepoc:/etc/ansible# ansible windows -i hosts -m win_ping

Kai Stian Olstad

未読、
2016/09/30 5:19:472016/09/30
To: ansible...@googlegroups.com
On 30.09.2016 10:53, JayB wrote:
> I have followed the same but I'm still getting the same error. Please
> find
> the result below:
>
> root@use-ansiblepoc:/etc/ansible# pip install "requests>=2.10.0"
> Downloading/unpacking requests>=2.10.0
> Downloading requests-2.11.1-py2.py3-none-any.whl (514kB): 514kB
> downloaded
> Installing collected packages: requests
> Found existing installation: requests 2.2.1
> Not uninstalling requests at /usr/lib/python2.7/dist-packages,
> owned by OS

It will not install from pip when the OS package is install,
you need to remove the OS package first.
apt-get purge python-requests

--
Kai Stian Olstad

JayB

未読、
2016/09/30 6:41:402016/09/30
To: Ansible Project、ansible-pr...@olstad.com
Thanks Kai,

I worked and moved forward a bit but got the below error.

root@use-ansiblepoc:/etc/ansible# ansible windows -i hosts -m win_ping
10.20.10.179 | FAILED! => {
    "failed": true,
    "msg": "ssl: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
 

JayB

未読、
2016/10/07 6:01:492016/10/07
To: Ansible Project、ansible-pr...@olstad.com
Guys, can I get any help on this?

Aidan Gustard

未読、
2016/10/07 11:27:232016/10/07
To: Ansible Project、ansible-pr...@olstad.com
Try adding these into your group_vars/windows.yml file.

ansible_connection: winrm
ansible_ssh_port
: 5986
ansible_winrm_transport
: ssl
validate_certs
: false
ansible_winrm_server_cert_validation
: ignore

J Hawkesworth

未読、
2016/10/10 3:23:052016/10/10
To: Ansible Project、ansible-pr...@olstad.com
Did adding

ansible_winrm_server_cert_validation: ignore

Fix this for you?

Jon

JayB

未読、
2016/10/13 7:49:422016/10/13
To: Ansible Project、ansible-pr...@olstad.com
No, It didn't work. I already tried that last week. Any other option?

JayB

未読、
2016/10/13 8:10:312016/10/13
To: Ansible Project、ansible-pr...@olstad.com
What configuration does it need for PowerShell?

J Hawkesworth

未読、
2016/10/18 11:07:482016/10/18
To: Ansible Project、ansible-pr...@olstad.com
Running this script should do all the configuration of WinRM that is needed to control via ansible. if that is what you mean.

https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
全員に返信
投稿者に返信
転送
新着メール 0 件