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:
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.
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:
Solutions
If a comment by someone helped you to solve the issue, please tick 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:
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.
@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
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
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”