# Docker\_image : Error loading image Specified path does not exist. (The path being perfectly fine)

**URL:** <https://forum.ansible.com/t/docker-image-error-loading-image-specified-path-does-not-exist-the-path-being-perfectly-fine/38362>\
**Category:** Ansible Project\
**Created:** [August 23, 2023, 3:12pm UTC](https://forum.ansible.com/t/docker-image-error-loading-image-specified-path-does-not-exist-the-path-being-perfectly-fine/38362 "2023-08-23T15:12:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Lauzin](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@Frederic\_Lauzin](https://forum.ansible.com/u/Frederic_Lauzin)\
**Post date:** [August 23, 2023, 3:12pm UTC](https://forum.ansible.com/t/docker-image-error-loading-image-specified-path-does-not-exist-the-path-being-perfectly-fine/38362/1 "2023-08-23T15:12:36Z")

</div>

Hi !

Hope everyone is doing well,

I downloaded grafana image from docker hub.

I generated my .tar using :  
_sudo docker save -o /path/grafana\_image.tar grafana/grafana:latest_

I am using a role to define grafana, here is the docker\_image part (i tryed relative path using role\_path, but for debugging purpose i specified absolute path) :  
_- name: Load Grafana image_  
_docker\_image:_  
_name: grafana/grafana:latest_  
_load\_path: /path/grafana\_image.tar_  
_source: load_  
_become: true_

I defined somes specific permissions :  
_ll /path/grafana\_image.tar_  
_-r–r----- 1 user user /path/grafana\_image.tar_

And now if i launch ansible-playbook :  
_TASK [grafana : Load Grafana image]_  
_fatal: [monitoring]: FAILED! =\> {“changed”: false, “msg”: “Error loading image grafana/grafana. Specified path /path/grafana\_image.tar does not exist.”}_

If i check the path its completely fine :  
_ll /path/grafana\_image.tar_  
_-r–r----- 1 user user /path/grafana\_image.tar_

So as you can see it doest not make any sense, i tryed with chmod 770, relative/absolute path, regenerating .tar but nothing seems to work,

Do you have any idea about what could be wrong here ?

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [August 23, 2023, 8:28pm UTC](https://forum.ansible.com/t/docker-image-error-loading-image-specified-path-does-not-exist-the-path-being-perfectly-fine/38362/2 "2023-08-23T20:28:15Z")

</div>

Hi,

does /path/grafana\_image.tar exist on the target where the module is  
executed? Or do you only have it on the controller where ansible itself  
is running?

The file needs to be on the target for the module to use it. If it  
isn't there yet, you need to use the ansible.builtin.copy module to  
copy it to the target first.

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![Frederic\_Lauzin](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@Frederic\_Lauzin](https://forum.ansible.com/u/Frederic_Lauzin)\
**Post date:** [August 24, 2023, 1:11pm UTC](https://forum.ansible.com/t/docker-image-error-loading-image-specified-path-does-not-exist-the-path-being-perfectly-fine/38362/3 "2023-08-24T13:11:02Z")

</div>

Hi Felix Fontain !

Thank you very much that must be that since i just have the .tar locally where i run Ansible,

It’s obvious now you say that !

Best regards,
