# Getting error while running a play from AWX 23.2.0

**URL:** <https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192>\
**Category:** Get Help\
**Tags:** cisco, ssh, playbook, ubuntu\
**Created:** [September 29, 2023, 11:55am UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192 "2023-09-29T11:55:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![swattik](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@swattik](https://forum.ansible.com/u/swattik)\
**Post date:** [September 29, 2023, 11:55am UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/1 "2023-09-29T11:55:39Z")

</div>

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.

```auto
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:

  tasks:
    - 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.

---

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [September 29, 2023, 2:59pm UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/2 "2023-09-29T14:59:13Z")

</div>

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](https://docs.ansible.com/ansible/latest/collections/cisco/asa/asa_command_module.html)

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](https://docs.ansible.com/automation-controller/4.0.0/html/userguide/projects.html#ansible-galaxy-support)

2. create an EE with it [Introduction to Ansible Builder — Ansible Builder Documentation](https://ansible.readthedocs.io/projects/builder/en/latest/)

---

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [September 29, 2023, 4:16pm UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/3 "2023-09-29T16:16:04Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/ansible/original/1X/62f345b4d76cfdaf11b07ccf4925319edf657c6d.png)

## Solutions

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

![image](https://us1.discourse-cdn.com/ansible/original/1X/de4bda8ca15f48c52ff19f12b452d10c02126f7f.png)

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:

![image](https://us1.discourse-cdn.com/ansible/original/1X/8964a515490358701e2c80d4ab69712f980e764c.png)

Let us know if you have any questions or doubts!

---

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [September 29, 2023, 6:01pm UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/4 "2023-09-29T18:01:31Z")

</div>

> [@IPvSean](#):
>
> 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](https://docs.ansible.com/ansible/latest/collections/cisco/asa/asa_command_module.html)
> 
> 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](https://docs.ansible.com/automation-controller/4.0.0/html/userguide/projects.html#ansible-galaxy-support)
> 2. create an EE with it [Introduction to Ansible Builder — Ansible Builder Documentation](https://ansible.readthedocs.io/projects/builder/en/latest/)

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](https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html#installing-ansible-on-ubuntu) using the PPA package:

```auto
$ 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](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-and-upgrading-ansible-with-pipx):

```auto
pip install ansible

```

---

<div class="post-metadata">

**Author:** ![swattik](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@swattik](https://forum.ansible.com/u/swattik)\
**Post date:** [October 3, 2023, 7:45am UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/5 "2023-10-03T07:45:05Z")

</div>

Thanks Leo, for making the necessary changes and guidance.

---

<div class="post-metadata">

**Author:** ![swattik](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@swattik](https://forum.ansible.com/u/swattik)\
**Post date:** [October 4, 2023, 8:33am UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/6 "2023-10-04T08:33:25Z")

</div>

@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

```auto
Instances
awx-demo-task-5cf856df6f-gkhwl
Details
Back to Instances
Details
Peers
Host Name
awx-demo-task-5cf856df6f-gkhwl
Status
Ready
Node Type
control
Policy Type
Auto
Host
10.244.0.73
Running Jobs
0
Total Jobs
10

```

```auto
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

```

```auto
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”

```auto
{
  "ANSIBLE_FORCE_COLOR": "false",
  "GIT_SSH_COMMAND": "ssh -o StrictHostKeyChecking=no"
}

```

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

---

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [October 5, 2023, 3:06pm UTC](https://forum.ansible.com/t/getting-error-while-running-a-play-from-awx-23-2-0/1192/7 "2023-10-05T15:06:34Z")

</div>

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: [https://github.com/ansible/product-demos/blob/main/collections/requirements.yml](https://github.com/ansible/product-demos/blob/main/collections/requirements.yml)

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