# AWX Ansible - Unable to select Playbook in Job template.

**URL:** <https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918>\
**Category:** Get Help\
**Tags:** vmware, playbook, awx, howto, kubernetes\
**Created:** [April 12, 2024, 8:04am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918 "2024-04-12T08:04:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince7](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vince7](https://forum.ansible.com/u/vince7)\
**Post date:** [April 12, 2024, 8:04am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/1 "2024-04-12T08:04:19Z")

</div>

Hi, I’m setting up an AWX Ansible environment in an enclosed environment (disconnected from Internet). The AWX Ansible is deployed in a VMware Tanzu Kubernetes.  
In AWX Ansible:

- create a Project → Source Control URL is using: ssh://git@gitlab.outpost.ws/…/ansible-awx.git.

- create Credential -\>SSH Private Key.

In AWX Ansible ‘Project’, I’m able to to sync without error.

Issue hit when I tried to create AWX Ansible ‘Job Template’. In adding a ‘Job Template’, I 'm able to select ‘Project’, able to select ‘Credentials’. But when I tried to select a ‘Playbook’ it returns ‘No results found’. In my Gitlab.outpost.ws, I did create .yaml files.

Please advice how do I able to select ‘Playbook’ in AWX Ansible ‘Job Template’.

Thank you.

---

<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:** [April 17, 2024, 2:50am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/2 "2024-04-17T02:50:18Z")

</div>

It looked in the “normal places” and didn’t find anything it recognized as a playbook in your project. I suspect either the location or the format of your playbook is at issue.

---

<div class="post-metadata">

**Author:** ![vince7](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vince7](https://forum.ansible.com/u/vince7)\
**Post date:** [April 17, 2024, 6:04am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/3 "2024-04-17T06:04:27Z")

</div>

I can actually see my created yaml files when SSH to Ansible AWX. But selection of the playbooks in the GUI of the Ansible AWX is not working. This is the frustrations part.

---

<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:** [April 17, 2024, 5:59pm UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/4 "2024-04-17T17:59:07Z")

</div>

Details would be welcome. At what path do you see them? What’s the SCM branch, and the project branch? Does `ansible-lint` identify them as playbooks?

I appreciate the frustration, but persuading us that AWX should be happy isn’t going to make AWX be happy. So let’s concentrate on things that may prevent your playbooks being shown in the pull-down.

---

<div class="post-metadata">

**Author:** ![vince7](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vince7](https://forum.ansible.com/u/vince7)\
**Post date:** [April 19, 2024, 8:15am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/5 "2024-04-19T08:15:09Z")

</div>

Hi Lewis, Source Control type is Git. Project branch is Master.  
Is the a way to change the Project Base Path in AWX Ansible Job Template?  
My AWX Ansible is created in an K8 environment.  
Deep Dive into:  
kubectl --namespace=awx get pods  
(this will display the AWS pods)  
kubectl exec -n awx awx-XXXXXXX -it – /bin/sh

Using this reference [15. Projects — Ansible AWX community documentation](https://ansible.readthedocs.io/projects/awx/en/latest/userguide/projects.html#projects)

I try to navigate \var\lib\awx  
But i cannot find the /etc/awx/conf.d/custom.py to change the Project Base Path in AWX Ansible Job Template.

Please advice.

---

<div class="post-metadata">

**Author:** ![vince7](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vince7](https://forum.ansible.com/u/vince7)\
**Post date:** [April 19, 2024, 8:41am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/6 "2024-04-19T08:41:20Z")

</div>

In my AWX Ansible Job Template:  
The project base path is: /var/lib/awx/projects.  
The Playbook Directory is: using Gitlab source control type.

Hence, could this cause the Playbook to being unable to shown in the pull-down ?

---

<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:** [April 19, 2024, 3:37pm UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/7 "2024-04-19T15:37:31Z")

</div>

> Is the a way to change the Project Base Path in AWX Ansible Job Template?

I don’t believe there is, and I would strongly recommend against it in any case.

Earlier you said

> I can actually see my created yaml files when SSH to Ansible AWX.

You should be able to see your project(s) with

```txt
ls -l /var/lib/awx/projects

```

> I try to navigate `\var\lib\awx`

That would need to be “`/var/lib/awx`”, not “`\var\lib\awx`”. Slash direction matters.

In your gitlab “`ansible-awx`” project, what is the name of your playbook, and where is it in that project? Based on your last post, it appears your “Playbook directory” is unset, which should not be the case if a working project has synced.

---

<div class="post-metadata">

**Author:** ![vince7](https://avatars.discourse-cdn.com/v4/letter/v/f05b48/32.png) [@vince7](https://forum.ansible.com/u/vince7)\
**Post date:** [April 23, 2024, 3:32am UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/8 "2024-04-23T03:32:47Z")

</div>

Hi Mr Lewis,

Yes, I’m to see my ansible project created at standalone Gitlab at /var/lib/awx/projects.

In AWX Ansible-\> Projects I’m able to sync without error to the project created at standalone Gitlab.

But in AWX Ansible-\> Creating a Job Templates, the playbooks are unavailable to select.

---

<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:** [April 23, 2024, 4:00pm UTC](https://forum.ansible.com/t/awx-ansible-unable-to-select-playbook-in-job-template/4918/9 "2024-04-23T16:00:42Z")

</div>

Plenty of frustration to go around. The problem is that AWX isn’t recognizing as playbooks what you think are playbooks. We’re trying to establish why that is, but we need technical details to determine that. It’s up to you to provide those technical details. So when I ask stuff like

> [@utoddl](#):
>
> At what path do you see them?

I’m hoping for an answer like

> [@](#):
>
> My playbooks show up in AWX as `/var/lib/awx/projects/ansible-awx/playbook1.yml` and `/var/lib/awx/projects/ansible-awx/playbook2.yml`. Behold:
> 
> ```txt
> $ ls -l /var/lib/awx/projects/ansible-awx/play*.yml`
> -rw-r--r--. 1 root root 217 Apr 23 11:14 /var/lib/awx/projects/ansible-awx/playbook1.yml
> -rw-r--r--. 1 root root 238 Apr 23 11:14 /var/lib/awx/projects/ansible-awx/playbook2.yml
> 
> ```

But I’m not getting responses like that. Instead I’m getting (paraphrased) “Yes, I can see them.” Try to understand the difference between _telling me that you can see them_ and _showing me what you - and AWX - actually see_. We already know that you think it should be working. We need details about what’s _actually there_ before we can speculate on why AWX isn’t recognizing your playbooks as playbooks. We’ve been trading messages for over a week, and we still don’t even know the names or full path(s) to your playbooks!

Likewise, when asked (six days ago)

> [@utoddl](#):
>
> Does `ansible-lint` identify them as playbooks?

it would be helpful to respond with a relevant part of the output from “`ansible-lint -v`”, like this:

> [@](#):
>
> ```txt
> INFO Executing syntax check on playbook playbook1.yml (0.66s)
> INFO Executing syntax check on playbook playbook2.yml (0.67s)
> INFO Executing syntax check on playbook one-off-test.yml (0.71s)
> 
> ```

That would tell us a whole lot. It may be that `ansible-lint` doesn’t recognize any playbooks either. Who knows? Not us.

> [@vince7](#):
>
> But in AWX Ansible-\> Creating a Job Templates, the playbooks are unavailable to select.

What playbooks? AWX doesn’t see any, and so far, neither have I. I don’t believe you have any playbooks in the expected places. Which, oddly enough, is basically what I said in my first response. So far you’ve presented no detail that would change my mind. Show me — rather than “tell me about” — what AWX and `ansible-lint` see.

> [@vince7](#):
>
> The Playbook Directory is: using Gitlab source control type.

I skipped over this before because it makes no sense. “`using Gitlab source control type.`” is not a directory. Well, not a _sane_ directory. If that wasn’t a posting mistake, and is actually what AWX is showing as your playbook directory, then of course AWX isn’t going to find your playbooks in a directory called “`using Gitlab source control type.`”. Fix that first.
