Running a Playbook in AWX Template

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.

Playbook:

ansible 2.5.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/home/vagrant/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

Hi, maybe in CLI it works because you have put the parameter: “ignore_errors: true” and AWX is more exacting and it doesn’t listen to that parameter.

./awx-manage --version
1.0.2.0

I tried omitting that parameter, that did not work. It seems to be complaining about “- name:” parameter in line 5.

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:

Perhaps your version of AWX has an older embedded version of Ansible which didn’t have the win_wait_for module.

-John

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.

Thanks in advance.

[vagrant@awx ansible]$ ansible --version
ansible 2.5.2
config file = /home/vagrant/ansible/ansible.cfg
configured module search path = [u’/home/vagrant/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]

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.

-John