# Destination directory /var/www/ansible does not exist

**URL:** <https://forum.ansible.com/t/destination-directory-var-www-ansible-does-not-exist/3272>\
**Category:** Get Help\
**Created:** [January 11, 2024, 2:01pm UTC](https://forum.ansible.com/t/destination-directory-var-www-ansible-does-not-exist/3272 "2024-01-11T14:01:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nedloussimohammedami](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nedloussimohammedami/32/1972_2.png) [@nedloussimohammedami](https://forum.ansible.com/u/nedloussimohammedami)\
**Post date:** [January 11, 2024, 2:01pm UTC](https://forum.ansible.com/t/destination-directory-var-www-ansible-does-not-exist/3272/1 "2024-01-11T14:01:12Z")

</div>

In your topology, i’ am using two web servers, one load balancer, one database server, and the controller,  
i have the following error:

fatal: [web1]: FAILED! =\> {“changed”: false, “checksum”: “7554a0a3dd2af0c29c3819db80d7782bed390fed”, “msg”: “Destination directory /var/www/ansible does not exist”}  
fatal: [web2]: FAILED! =\> {“changed”: false, “checksum”: “7554a0a3dd2af0c29c3819db80d7782bed390fed”, “msg”: “Destination directory /var/www/ansible does not exist”}

I checked `/var/www/ansible` , and it does exist. I even added a condition in my playbook to create it if it doesn’t exist. However, it’s still not working. I’m using the user ‘yoda’ instead of ‘vagrant’, and I’m concerned that I might not have the privileges to write to the file. When I try to manually modify it via ‘web1’ or ‘web2’, it works successfully. But right after I run my playbook, the permissions revert to default, and I can’t execute the command `ls -Z /var/www/ansible` via ‘web1’ or ‘web2’. Do you know what the issue might be? When I execute `curl lb/db.php` , I receive a 503 service unavailable error message."

---

<div class="post-metadata">

**Author:** ![jrglynn2](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jrglynn2](https://forum.ansible.com/u/jrglynn2)\
**Post date:** [January 11, 2024, 4:18pm UTC](https://forum.ansible.com/t/destination-directory-var-www-ansible-does-not-exist/3272/2 "2024-01-11T16:18:15Z")

</div>

Hard to tell without seeing the playbook, but are you using `become` and maybe `become_user`?
