Getting error while running a play from AWX 23.2.0

Have installed AWX 23.2.0 and synced with my Git Repo, but getting below error while running a play. I’ve installed Ansible 2.9.x and Python 3.8.x on my Base OS which is Ubuntu 20.04. and from there I can run the same play without any issue. Seems to be a module issue, but not understanding if I need to install ansible and its modules separately in the Kubernetes pod.

SSH password: 
BECOME password[defaults to SSH password]: 
ERROR! couldn't resolve module/action 'asa_command'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/runner/project/eve-asa-pre-check.yml': line 9, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    - name: Pre checks
      ^ here

As this is the first time I’m working on AWX hence it would be really great if someone can guide me here to fix the issue.

This is not an AWX issue. The execution environment you are using does not have the asa_command, it is part of the cisco.asa content collection: cisco.asa.asa_command module – Run arbitrary commands on Cisco ASA devices — Ansible Documentation

You can either

  1. make a requirements.yml which will make AWX/automation controller install it on-demand 16. Projects — Automation Controller User Guide v4.0.0

  2. create an EE with it Introduction to Ansible Builder — Ansible Builder Documentation


Hi @swattik ,

I just edited your post to add the code block. Let me share a couple of tips on using the forum to make it easier for people to help out:

Code blocks

I just edited your message to include the “code blocks” tags for the playbook section, this makes it easier to read as it keeps the playbook format and spacing.

When composing your next messages, you can select the playbook section of text you copy/pasted and use the </> button in the tool-bar right at the top of the message window where you are typing, this will automatically put it in the box you see in the messages above. Here is a screen capture to show the button location:



If a comment by someone helped you to solve the issue, please tick :white_check_mark: the check-box below their message:


This will mark the message as the solution and show it in the first post for easy access, as well as recognize the person that helped:


Let us know if you have any questions or doubts!


Adding to the above by @IPvSean , please note that when you are running it locally from your Ubuntu 20.04 setup with Ansible 2.9, that is an old release that includes the modules, and you will have a different experience from that in another instance with an updated AWX and the use of execution environments.

If you need to upgrade your local setup, you can install the latest ansible community package in Ubuntu using the PPA package:

$ sudo apt update
$ sudo apt install software-properties-common
$ sudo add-apt-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible

Or install ansible using pip/pipx:

pip install ansible
1 Like

Thanks Leo, for making the necessary changes and guidance.

1 Like

@IPvSean @Leo , Thanks for suggesting the steps to fix the issue, But unfortunately issue still persist, as completely new to this environment hence unable to figure out where the changes are required.
As per below suggestion I need to make a "requirements.yml " a file under “” is this directory I’ll find in base OS or the Kubernetes POD where the AWX has installed. While checking the AWX GUI under “Project” after synced with GIT could see Project Base Path : /var/lib/awx/projects under Playbook Directory
_8__demo_git but while checking the base OS which is Ubuntu 20.04 not found this directory. Also unable to access any of the below POD and getting below error.

Where I could see below configuration automatically reflecting under AWX>Instances

Back to Instances
Host Name
Node Type
Policy Type
Running Jobs
Total Jobs
NAMESPACE              NAME                                                   READY   STATUS      RESTARTS       AGE
ansible-awx            pod/awx-demo-postgres-13-0                             1/1     Running     4 (44h ago)    6d22h
ansible-awx            pod/awx-demo-task-5cf856df6f-gkhwl                     4/4     Running     16 (44h ago)   6d22h
ansible-awx            pod/awx-demo-web-65758d7654-92jkl                      3/3     Running     13 (44h ago)   6d22h
ansible-awx            pod/awx-operator-controller-manager-6c58d59d97-lnnwf   2/2     Running     11 (44h ago)   6d23h
default                pod/my-nginx-b8dd4cd6-r8kzp                            1/1     Running     5 (44h ago)    6d23h

kubectl exec pod/awx-demo-task-5cf856df6f-gkhwl -c ansible-awx — /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Error from server (NotFound): pods "awx-demo-task-5cf856df6f-gkhwl" not found

16.7. Ansible Galaxy Support
At the end of a Project update, automation controller searches for a file called requirements.yml in the roles directory, located at <project-top-level-directory>/roles/requirements.yml. If this file is found, the following command automatically runs:

ansible-galaxy role install -r roles/requirements.yml -p <project-specific cache location>/requirements_roles -vvv

And also below is the config for “Environment Variables for Galaxy Commands”

  "GIT_SSH_COMMAND": "ssh -o StrictHostKeyChecking=no"

Again apologies for asking such a silly questions but any help would be greatly appreciated.

1 Like

I think we may have mis-communicated here. You need to have your requirements exactly at collections/requirements.yml in your Git repo for your project. For example here is mine in the product-demos Github repo:

This will install those collections on-demand when you run a Job Template using that project.

1 Like