# Running a Playbook in AWX Template

**URL:** <https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [May 11, 2018, 3:04pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516 "2018-05-11T15:04:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcalfa1](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Post date:** [May 11, 2018, 3:04pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/1 "2018-05-11T15:04:15Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![marcalfa1](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Post date:** [May 11, 2018, 3:09pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/2 "2018-05-11T15:09:12Z")

</div>

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)]

---

<div class="post-metadata">

**Author:** ![Miguel\_Cretu](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@Miguel\_Cretu](https://forum.ansible.com/u/Miguel_Cretu)\
**Post date:** [May 11, 2018, 3:09pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/3 "2018-05-11T15:09:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marcalfa1](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Post date:** [May 11, 2018, 3:13pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/4 "2018-05-11T15:13:41Z")

</div>

./awx-manage --version  
1.0.2.0

---

<div class="post-metadata">

**Author:** ![marcalfa1](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Post date:** [May 11, 2018, 3:39pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/5 "2018-05-11T15:39:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jowestco](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jowestco](https://forum.ansible.com/u/jowestco)\
**Post date:** [May 14, 2018, 8:31pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/6 "2018-05-14T20:31:17Z")

</div>

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:

 ![](https://us1.discourse-cdn.com/ansible/original/2X/a/a446f76a4f93b7f48430d1291c64088e713634ab.png)

Perhaps your version of AWX has an older embedded version of Ansible which didn’t have the win\_wait\_for module.

-John

---

<div class="post-metadata">

**Author:** ![Kosala\_Atapattu1](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kosala\_Atapattu1](https://forum.ansible.com/u/Kosala_Atapattu1)\
**Post date:** [May 14, 2018, 9:07pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/7 "2018-05-14T21:07:06Z")

</div>

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.

 ![](https://us1.discourse-cdn.com/ansible/original/2X/f/f647c2c46f6e5b1f160fc078ff1de6b87e530672.png)

​

---

<div class="post-metadata">

**Author:** ![marcalfa1](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@marcalfa1](https://forum.ansible.com/u/marcalfa1)\
**Post date:** [May 16, 2018, 11:32pm UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/8 "2018-05-16T23:32:26Z")

</div>

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.

 ![](https://us1.discourse-cdn.com/ansible/original/2X/3/3041c46bab8e4cc8973c637dacaacf21ca22c105.png)

[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)]**

---

<div class="post-metadata">

**Author:** ![jowestco](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jowestco](https://forum.ansible.com/u/jowestco)\
**Post date:** [May 17, 2018, 2:38am UTC](https://forum.ansible.com/t/running-a-playbook-in-awx-template/27516/9 "2018-05-17T02:38:30Z")

</div>

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
