# /var/lib/awx directory is not created

**URL:** <https://forum.ansible.com/t/var-lib-awx-directory-is-not-created/2267>\
**Category:** Get Help\
**Tags:** ubuntu, awx\
**Created:** [November 9, 2023, 1:49pm UTC](https://forum.ansible.com/t/var-lib-awx-directory-is-not-created/2267 "2023-11-09T13:49:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![margo.siilbek](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@margo.siilbek](https://forum.ansible.com/u/margo.siilbek)\
**Post date:** [November 9, 2023, 1:49pm UTC](https://forum.ansible.com/t/var-lib-awx-directory-is-not-created/2267/1 "2023-11-09T13:49:55Z")

</div>

I have tried installing AWX. /var/lib/awx directory is not created. When I build it myself, the manual projects cannot be run, the playbooks are not found: “There are no available playbook directories in /var/lib/awx/projects. Either that directory is empty, or all of the contents are already assigned to other projects. Create a new directory there and make sure the playbook files can be read by the “awx” system user, or have AWX directly retrieve your playbooks from source control using the Source Control Type option above.”

I used the guide [https://computingforgeeks.com/how-to-install-ansible-awx-on-ubuntu-linux/?expand\_article=1#google\_vignette](https://computingforgeeks.com/how-to-install-ansible-awx-on-ubuntu-linux/?expand_article=1#google_vignette) I also tried other similar guides but they also gave the same result.

If I look at the /var/lib directory in the container (kubectl exec -ti deploy/awx-web -c redis – /bin/bash), there are very few files in that directory, the awx directory is not there either.

Do I have to create and link this directory myself?

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [November 9, 2023, 2:56pm UTC](https://forum.ansible.com/t/var-lib-awx-directory-is-not-created/2267/2 "2023-11-09T14:56:19Z")

</div>

> kubectl exec -ti deploy/awx-web -c redis – /bin/bash

You should dig into the `awx-web` container instead of `redis` container: `kubectl exec -ti deploy/awx-web -c awx-web – /bin/bash`

Also similar topic is here: [AWX: There are no available playbook directories in /var/lib/awx/projects](http://forum.ansible.com/t/awx-there-are-no-available-playbook-directories-in-var-lib-awx-projects/2239)

---

<div class="post-metadata">

**Author:** ![margo.siilbek](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@margo.siilbek](https://forum.ansible.com/u/margo.siilbek)\
**Post date:** [November 13, 2023, 11:58am UTC](https://forum.ansible.com/t/var-lib-awx-directory-is-not-created/2267/3 "2023-11-13T11:58:15Z")

</div>

Hi,

Thank you for the answer!  
Neither /var/lib nor /opt directory (outside of containers) contains any AWX or ansible directory

kubectl exec -ti deploy/awx-web -c awx-web – /bin/bash  
bash-5.1$  
cd /var/lib/awx/  
bash-5.1$ ls -la  
total 36  
drwxrwxr-x 1 root root 4096 Nov 13 11:33 .  
drwxr-xr-x 1 root root 4096 Nov 13 11:08 …  
prw------- 1 awx root 0 Nov 13 11:09 awxfifo  
-rw------- 1 awx root 187 Nov 13 11:33 .bash\_history  
drwxr-xr-x 3 root root 4096 Nov 7 19:16 .local  
drwxrwxr-x 2 root 1000 4096 Nov 13 10:31 projects  
drwxr-xr-x 3 root root 4096 Nov 7 19:16 public  
drwxrwxr-x 1 root root 4096 Nov 7 19:16 rsyslog  
drwxr-xr-x 3 root root 4096 Nov 7 19:05 venv  
bash-5.1$ id  
uid=1000(awx) gid=0(root) groups=0(root)  
bash-5.1$ mkdir projects/test1  
mkdir: cannot create directory ‘projects/test1’: Permission denied  
bash-5.1$ ls -l projects/  
total 0  
bash-5.1$

Can I add it now?

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [November 15, 2023, 12:43pm UTC](https://forum.ansible.com/t/var-lib-awx-directory-is-not-created/2267/4 "2023-11-15T12:43:50Z")

</div>

Is it correct that you want to use a Manual type projects? If that is not your goal, please let me know just in case I am not sure that trying to create a directory on `/var/lib/awx/projects` in the first place is the right approach.

If you want to use Manual type projects, this is only applicable for single node K3s, but the simplest way for you is finding the actual directory for your `/var/lib/awx` on your K3s host, and create and place directories and files there.

```bash
# Find your volume name for your PVC for projects
$ VOLUME_NAME=$(kubectl -n awx get pvc awx-projects-claim -o jsonpath='{.spec.volumeName}')

$ echo $VOLUME_NAME
pvc-d816835b-327f-4faf-8467-a567b984b148

# Find the directory for this volume
$ sudo ls -ld /var/lib/rancher/k3s/storage/${VOLUME_NAME}_awx_awx-projects-claim
drwxrwxr-x. 4 root kuro 79 Nov 15 21:22 /var/lib/rancher/k3s/storage/pvc-d816835b-327f-4faf-8467-a567b984b148_awx_awx-projects-claim

```

This directory on your K3s host is mounted as `/var/lib/awx/projects` on `awx-web` and `awx-task` pod, so if you create directories and files there, you should be able to use it as Manual type project.

If you don’t like the random name `pvc-*`, my guide is good example that allows you to use `/data/projects` on the k3s host as project directory in AWX: [GitHub - kurokobo/awx-on-k3s: An example implementation of AWX on single node K3s using AWX Operator, with easy-to-use simplified configuration with ownership of data and passwords.](https://github.com/kurokobo/awx-on-k3s)
