# how to solve local\_action -\> unreachable?

**URL:** <https://forum.ansible.com/t/how-to-solve-local-action-unreachable/30923>\
**Category:** Ansible Project\
**Created:** [July 31, 2019, 9:34pm UTC](https://forum.ansible.com/t/how-to-solve-local-action-unreachable/30923 "2019-07-31T21:34:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Rios](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@Gabriel\_Rios](https://forum.ansible.com/u/Gabriel_Rios)\
**Post date:** [July 31, 2019, 9:34pm UTC](https://forum.ansible.com/t/how-to-solve-local-action-unreachable/30923/1 "2019-07-31T21:34:02Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![Gabriel\_Rios](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@Gabriel\_Rios](https://forum.ansible.com/u/Gabriel_Rios)\
**Post date:** [August 1, 2019, 5:11pm UTC](https://forum.ansible.com/t/how-to-solve-local-action-unreachable/30923/2 "2019-08-01T17:11:32Z")

</div>

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.
