how to solve local_action -> unreachable?

Hi,

I’m currently experiencing a problem when executing the following playbook. Everything I’m currently executing is attached too. What should I modify?

Maybe you’ve wondered why I don’t just set everything to local. My playbook contains other tasks to pull facts from a Windows machine. That’s why I have the connection configured for winrm. Then I want to retrieve those facts into a .csv file created locally, which is what is failing.

Update:

I have used delegate_to: localhost too, without success.

I added this to the playbook expecting to connect to my pc:

  • name: change connection
    add_host:
    hostname: name
    ansible_user: myuser
    ansible_password: mypassphrase
    ansible_port: 22
    ansible_connection: ssh
    changed_when: true

Seems it doesn’t actually change the connection

TASK [change connection] *******************************************************************************************
changed: [10.240.30.249]

TASK [execute locally] *******************************************************************************************
[WARNING]: No python interpreters found for host 10.240.30.249 (tried [‘/usr/bin/python’, ‘python3.7’,
‘python3.6’, ‘python3.5’, ‘python2.7’, ‘python2.6’, ‘/usr/libexec/platform-python’, ‘/usr/bin/python3’,
‘python’])

fatal: [10.240.30.249]: FAILED! => {“ansible_facts”: {“discovered_interpreter_python”:… and so on.