# network unreachable

**URL:** <https://forum.ansible.com/t/network-unreachable/31503>\
**Category:** Ansible Project\
**Created:** [October 22, 2019, 6:50am UTC](https://forum.ansible.com/t/network-unreachable/31503 "2019-10-22T06:50:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien\_Cochennec](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Julien\_Cochennec](https://forum.ansible.com/u/Julien_Cochennec)\
**Post date:** [October 22, 2019, 6:50am UTC](https://forum.ansible.com/t/network-unreachable/31503/1 "2019-10-22T06:50:52Z")

</div>

Hi,  
Searching proxy in this list, I found no answer, so maybe it’s not a proxy issue :

I run a playbook with following task :

`

- name: download miniconda installer  
get\_url:  
url={{ miniconda\_url }}  
dest={{ miniconda\_tmp }}/miniconda.sh  
mode=0755  
register: miniconda\_downloaded  
when: bin\_conda.stat.exists == False  
`

I get this error :

`fatal: [ansible-target]: FAILED! => changed=false msg: 'Failed to connect to repo.anaconda.com at port 443: [Errno 101] Le réseau n''est pas accessible' status: -1 url: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh`

Le réseau n’‘est pas accessible’ is french for network unreachable.  
If I try, on both admin and target, with ansible user ID (sudo su - ansible) the command :  
wget [https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86\_64.sh](https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh)

It works.

Why would ansible fail to download this as wget succeeds? Is there a proxy configuration I forgot?

---

<div class="post-metadata">

**Author:** ![Julien\_Cochennec](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Julien\_Cochennec](https://forum.ansible.com/u/Julien_Cochennec)\
**Post date:** [October 22, 2019, 6:56am UTC](https://forum.ansible.com/t/network-unreachable/31503/2 "2019-10-22T06:56:01Z")

</div>

I forgot ton mention that http\_proxy and https\_proxy are defined on both admin and target

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 22, 2019, 10:50pm UTC](https://forum.ansible.com/t/network-unreachable/31503/3 "2019-10-22T22:50:08Z")

</div>

I guess you have http\_proxy/https\_proxy set in the environment for the Ansible user?

When Ansible execute scripts on the remote host it's using non interactive shell and it's not reading all the environment files that a interactive shell does.  
So the easiest solution would be to set the environment in Ansible  
[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_environment.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_environment.html)
