AWX Ansible - Unable to select Playbook in Job template.

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.

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.

1 Like

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.

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.

1 Like

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

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.

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 ?

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

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.

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.

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

I’m hoping for an answer like

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)

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

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

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.

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.

2 Likes