changed task syntax 1.1 to 1.3

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

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

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

- name: check if artifact exists
  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

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

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

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

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

-Tim

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

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

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

FYI:

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

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

Regards,

Clifford