# Within Ansible Automation Platform, getting '/path/to/directory' does not exist, when it does indeed

**URL:** <https://forum.ansible.com/t/within-ansible-automation-platform-getting-path-to-directory-does-not-exist-when-it-does-indeed/37427>\
**Category:** Ansible Developer\
**Tags:** aap, awx\
**Created:** [December 6, 2022, 5:25am UTC](https://forum.ansible.com/t/within-ansible-automation-platform-getting-path-to-directory-does-not-exist-when-it-does-indeed/37427 "2022-12-06T05:25:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim2](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim2](https://forum.ansible.com/u/Tim2)\
**Post date:** [December 6, 2022, 5:25am UTC](https://forum.ansible.com/t/within-ansible-automation-platform-getting-path-to-directory-does-not-exist-when-it-does-indeed/37427/1 "2022-12-06T05:25:35Z")

</div>

Hi Guys,

I have a playbook that gets all of the files within a directory:

```auto
- name: Find Backup Files to Move
find: paths: /path/to/directory
recurse: no
excludes: 'test-file.tar.gz'
delegate_to: localhost
register: testfiles

```

This playbook keeps failing with the following message:

```auto

**[WARNING]: Skipped '/path/to/directory' path due to this access issue:**

6
**'/path/to/directory' is not a directory**

```

The directory certainly does exist, and it is not empty:

```auto
-rwxr-x---. 1 awx awx 98358 Dec 6 00:00 test-file-2022-backup-12-06-00:00:06.tar.gz
lrwxrwxrwx. 1 awx awx 80 Dec 6 00:00 test-file-latest.tar.gz -> /path/to/directory/test-file-backup-2022-12-06-00:00:06.tar.gz

```

What can I do to troubleshoot this further?

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [December 6, 2022, 5:37pm UTC](https://forum.ansible.com/t/within-ansible-automation-platform-getting-path-to-directory-does-not-exist-when-it-does-indeed/37427/2 "2022-12-06T17:37:48Z")

</div>

My guess is that you are mistaken, either in the path or the host this task is executing on.  
In the mean time, what’s the difference between expected and actual output from the following task:

```auto

- name: Where is my missing path
shell: |
echo "Give me some clues:"
echo "Hostname: $(hostname)"
ls -ld /path
ls -ld /path/to
ls -ld /path/to/directory

```

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [December 6, 2022, 5:42pm UTC](https://forum.ansible.com/t/within-ansible-automation-platform-getting-path-to-directory-does-not-exist-when-it-does-indeed/37427/3 "2022-12-06T17:42:23Z")

</div>

Also, this conversation should be happening in  
[https://groups.google.com/g/ansible-project/](https://groups.google.com/g/ansible-project/)  
rather than  
[https://groups.google.com/g/ansible-devel/](https://groups.google.com/g/ansible-devel/)
