Hi
I am trying to connect to Windows Server 2012 from my ansible server (Centos7).
Let's assume its host is x and port is y
I managed to connect to other linux based servers but I cannot connect to the windows one.
I followed the tutorial here: http://docs.ansible.com/ansible/latest/intro_windows.html and after all setups and configurations I get the following error:
root@localhost: ansible# ansible windows -i hosts -m win_ping --ask-vault-pass
Vault password:
WindowsServer | UNREACHABLE! => {
"changed": false,
"msg": "ssl: HTTPSConnectionPool(host='x', port=y): Max retries exceeded with url: /wsman (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))",
This is my group_vars/windows.yml file:
# it is suggested that these be encrypted with ansible-vault:
# ansible-vault edit group_vars/windows.yml
ansible_user: Administrator
ansible_password: password
ansible_port: y
ansible_connection: winrm
This is my hosts file snippet:
[windows]
WindowsServer ansible_host=x
I did configure windows server with this file: ConfigureRemotingForAnsible.ps1
Please help, I have no idea what to do to make the connection work.
I also asked this question here: https://stackoverflow.com/questions/45716102/ansible-cannot-connect-to-windowsserver-from-centos7
fatal: [WindowsServer]: UNREACHABLE! =>
{"changed": false, "msg": "ntlm: HTTPConnectionPool(host='161.90.234.10', port=8080):
Read timed out. (read timeout=30)", "unreachable": true}
125 # configure proxies from HTTP/HTTPS_PROXY envvars126 # session.trust_env = True127 session.trust_env = False