# changed task syntax 1.1 to 1.3

**URL:** <https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007>\
**Category:** Ansible Project\
**Created:** [June 21, 2013, 9:36pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007 "2013-06-21T21:36:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clifford\_Sanders](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Clifford\_Sanders](https://forum.ansible.com/u/Clifford_Sanders)\
**Post date:** [June 21, 2013, 9:36pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/1 "2013-06-21T21:36:13Z")

</div>

Hi,

I cloned the development branch to test a feature that was merged recently.

If I start my playbook which works with 1.1 I get a error:

ERROR: command is not a legal parameter in an Ansible task or handler

the task is:

- name: check if artifact exists  
command: wget -nv -O - ${nexus\_versions\_download\_url}

there is no error if I change this to:

- name: check if artifact exists  
action: command wget -nv -O - ${nexus\_versions\_download\_url}

I tried to find this syntax change in the documentation, but didn’t anything.

Regards,

Clifford

---

<div class="post-metadata">

**Author:** ![Timothy\_Gerla](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Timothy\_Gerla](https://forum.ansible.com/u/Timothy_Gerla)\
**Post date:** [June 21, 2013, 9:37pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/2 "2013-06-21T21:37:04Z")

</div>

Hi Clifford,

This syntax definitely hasn't changed. What is probably happening is  
your library path to the Ansible modules is not correct. How did you  
install Ansible?

-Tim

---

<div class="post-metadata">

**Author:** ![Timothy\_Gerla](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Timothy\_Gerla](https://forum.ansible.com/u/Timothy_Gerla)\
**Post date:** [June 21, 2013, 9:38pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/3 "2013-06-21T21:38:29Z")

</div>

Sorry, I replied too quickly. Try this format instead:

- name: check if artifact exists  
&nbsp;&nbsp;command: wget -nv -O - {{nexus\_versions\_download\_url}}

I seem to recall there might be a bug related to the YAML parsing--let  
me know if this works and we can dig in if not.

-Tim

---

<div class="post-metadata">

**Author:** ![Clifford\_Sanders](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Clifford\_Sanders](https://forum.ansible.com/u/Clifford_Sanders)\
**Post date:** [June 21, 2013, 9:54pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/4 "2013-06-21T21:54:29Z")

</div>

Hi Tim,

thank you for your quick response.

I still get the error when using

command: wget -nv -O - {{nexus\_versions\_download\_url}}

Regards,

Clifford

---

<div class="post-metadata">

**Author:** ![Timothy\_Gerla](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Timothy\_Gerla](https://forum.ansible.com/u/Timothy_Gerla)\
**Post date:** [June 21, 2013, 10:00pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/5 "2013-06-21T22:00:08Z")

</div>

Hi Clifford,

I've reproduced this locally and the workaround does seem to be to use  
action: -- I'll follow up and see if we can find a solution.

-Tim

---

<div class="post-metadata">

**Author:** ![Timothy\_Gerla](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Timothy\_Gerla](https://forum.ansible.com/u/Timothy_Gerla)\
**Post date:** [June 23, 2013, 5:22pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/6 "2013-06-23T17:22:54Z")

</div>

Hi Clifford,

I went back to this after a little while and I discovered that my test  
case was pointing at the wrong version of Ansible. At the head of 1.3  
devel, all of these three forms work:

[http://pastebin.com/etPcRf4e](http://pastebin.com/etPcRf4e)

So I wonder if it's possible that you're still on an older version of  
Ansible by mistake, like me?

-Tim

---

<div class="post-metadata">

**Author:** ![Clifford\_Sanders](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Clifford\_Sanders](https://forum.ansible.com/u/Clifford_Sanders)\
**Post date:** [June 23, 2013, 9:32pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/7 "2013-06-23T21:32:23Z")

</div>

Hi Tim,

I installed 1.3 devel in a new vagrant Vm (CentOS 6.4). So there was no other version installed.

I will try again tomorrow and will report about the outcome.

Clifford

---

<div class="post-metadata">

**Author:** ![Clifford\_Sanders](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Clifford\_Sanders](https://forum.ansible.com/u/Clifford_Sanders)\
**Post date:** [July 1, 2013, 8:34pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/8 "2013-07-01T20:34:00Z")

</div>

Hi Tim,

sorry it took so long.

As before, I fired up a new VM with vagrant and followed the installation instructions on this page:

[http://www.ansibleworks.com/docs/gettingstarted.html](http://www.ansibleworks.com/docs/gettingstarted.html)

There are no errors now. Unfortunately I still have the issue because of which i wanted to install the development branch in the first place. I will open a new thread for this issue.

I’m not sure if I installed EPEL prior to installing PyYAML, paramiko, jinja2 the last time I fired up the VM with vagrant. Maybe this was the problem?

Regards,

Clifford

---

<div class="post-metadata">

**Author:** ![Clifford\_Sanders](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Clifford\_Sanders](https://forum.ansible.com/u/Clifford_Sanders)\
**Post date:** [July 1, 2013, 8:48pm UTC](https://forum.ansible.com/t/changed-task-syntax-1-1-to-1-3/13007/9 "2013-07-01T20:48:31Z")

</div>

FYI:

I thought my problem was related to [https://github.com/ansible/ansible/pull/3147](https://github.com/ansible/ansible/pull/3147).

But instead it seems to be this issue: [https://github.com/ansible/ansible/issues/3183](https://github.com/ansible/ansible/issues/3183)

Regards,

Clifford
