---
- hosts: all
vars_files:
- winrms.yml
tasks:
- name: execute locally
local_action:
module: file
path: /home/gabriel/Conex_ansible/reporte.csv
state: touch
It gives the error
fatal: [10.240.30.249]: UNREACHABLE! => {"changed": false, "msg": "ssl: HTTPSConnectionPool(host='localhost', port=5986):
Max retries exceeded with url: /wsman (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object
at 0x7fd25dd28590>: Failed to establish a new connection: [Errno 111] Connection refused',))", "unreachable": true}
I am currently connected to a Windows server, inventory.ini only contains the IP address of said server and winrms.yml contains:
---
ansible_user: user
ansible_password: password
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore