2

I'm tried creating a job template in AWX web interface. the list of playbooks is not displayed on the interface although the project has been downloaded to git and is visible in the directory ~/var/lib/awx/projects. my environment:

  • centOS 8
  • AWX 17.0.1
  • Ansible 2.9.17
  • docker-compose 1.28.2

enter image description here

Promise Preston
  • 24,334
  • 12
  • 145
  • 143
Eric-D
  • 66
  • 1
  • 4
  • awx sometimes does not pick up playbooks because of mismatch in names. try to see if creating a new playbook with different names help. – moficodes Feb 16 '21 at 01:41

3 Answers3

0

The yml file must not be empty and must have right syntax. After that , always sync project and then check

0

I had this same challenge when creating a new Job Template on Ansible AWX setup on Ubuntu 20.04.

I created some playbooks in a repository that was added to a project. I then created a Job Template and selected the Project, but none of the playbooks were added to the project.

My playbook looked this way:

- name: Check if SSHD is running
  command: systemctl status ssh
  ignore_errors: yes

Here's how I fixed it:

I simply added hosts to the playbook and it showed up on the Job template for me to select. So my playbook was modified to look this way:

- name: Check if SSHD is running
  hosts: all
  command: systemctl status ssh
  ignore_errors: yes

Note: The value for hosts could be something else. For me, it was all.

Resources: Playbooks aren’t showing up in the “Job Template” drop-down

That's all.

I hope that helps

Promise Preston
  • 24,334
  • 12
  • 145
  • 143
0

I had the same problem. Once I made sure my git repo was up-to-date, I manually typed in the playbook name in the awx template creation screen, and my playbook was selected.

ficestat
  • 313
  • 1
  • 4
  • 13