When I run this playbook from CLI using “ansible-playbook” it’s working fine. When I try to run it from AWX console using a template, i’m getting the error below.
Can anyone please help me figure out what I’m doing wrong?
Thank you in advance.
Error Message:
SSH password:
2
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
3
4
The error appears to have been in ‘/var/lib/awx/projects/_7__test_project/fw_rules_port22.yml’: line 5, column 7, but may
5
be elsewhere in the file depending on the exact syntax problem.
You posted an Ansible version you are running with; is that the embedded version of Ansible that AWX is using or that your target host is using?
To check the embedded version, scroll to the bottom of an AWX page and click the About link, you should get something like this:
If you still have the problem, I think there is a problem with your formatting. Assuming you’re using VScode or a similar editor, notice the “- debug” is in white, got me thinking there is a incorrect formatting somewhere.
I seem to be running two different versions of Ansible on my host. The CLI version is different than the version installed with AWX. Do you know how to bring the AWX/Ansible version to the latest?
This is not being run in docker.
I’m not sure what would happen if you upgrade ansible under AWX but it should be coming out of a python venv.
Can you upgrade your version of AWX to get a newer bundled version?
If you want to try just upgrading ansible, assuming that awx is installed in /var/lib/awx try running:
. /var/lib/awx/venv/awx/active
That should put you into awxs’ venv. You can then do "pip freeze | grep ansible” to get the ansible version installed and, if needed, upgrade ansible with pip.