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.”
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?
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.
# 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.