I need a role with some tasks for remote windows server and some tasks for localhost.
A sample like this fails with
UNREACHABLE! => {“changed”: false, “msg”: “plaintext: HTTPConnectionPool(host=‘localhost’, port=5985): Max retries exceeded with url: /wsman (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x335e5d0>: Failed to establish a new connection: [Errno 111] Connection refused’,))”, “unreachable”: true}
The command I use is as below and Ansible version is 2.3.1.0.
/usr/bin/ansible-playbook temp.yml --extra-vars=“ansible_user=Administrator” --extra-vars=“ansible_password=xxxxxx” --extra-vars=“ansible_port=5985” --extra-vars=“ansible_connection=winrm” -i /home/ansible_hosts -v
temp.yml