npm is not a legal parameter at this level in an Ansible playbook

193 views
Skip to first unread message

ansi11

unread,
Oct 21, 2014, 12:43:28 AM10/21/14
to ansible...@googlegroups.com
I am trying to install forever through npm on Centos 6.3 version. Getting the error as above if my .yml file is first level of playbook.
---
- name: install forever
  npm: name=forever global=yes state=latest

If I am adding these lines in mail.yml present in tasks folder of node.js role , I am getting this error:
npm is not defined as a legal parmeter at this level in an Ansible tasks or handler. 

Michael Peters

unread,
Oct 22, 2014, 4:20:44 PM10/22/14
to ansible...@googlegroups.com
Sounds like you're running ansible from a git checkout. If that is the
case, you need to make sure your git submodules have been fetched as
well since the big ansible git submodule split:

See https://groups.google.com/forum/#!msg/ansible-project/TUL_Bfmhr-E/rshKe30KdD8J
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1d091a24-4fb8-4378-936e-ef6e588e452e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Michael DeHaan

unread,
Oct 24, 2014, 9:15:39 AM10/24/14
to ansible...@googlegroups.com
Hi Michael,

That should not be a problem because Ansible will self-report and give a helpful error when it can't find modules this way.

ansi,

How did you install Ansible?





Nikita Agrawal

unread,
Oct 29, 2014, 2:03:41 AM10/29/14
to ansible...@googlegroups.com
Hi Michael,

I installed ansible through git checkout only. I am just checking if the problem is with git submodules. Will update shortly. 
Thanks for the reply :)

Nikita Agrawal

unread,
Oct 29, 2014, 2:15:15 AM10/29/14
to ansible...@googlegroups.com


On Wednesday, October 29, 2014 11:33:41 AM UTC+5:30, Nikita Agrawal wrote:
Hi Michael,

Thanks for the reply.I installed ansible through git checkout only. I used these commands as described on http://docs.ansible.com/intro_installation.html

$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible 
$ source ./hacking/env-setup 
So , I believe this is taking care of git submodules as well. But the problem still persist.

Nikita Agrawal

unread,
Oct 29, 2014, 5:20:21 AM10/29/14
to ansible...@googlegroups.com
I tried running following on existing git checkout .
git submodule update --init --recursive

same issue still exist

Michael DeHaan

unread,
Oct 30, 2014, 4:32:05 PM10/30/14
to ansible...@googlegroups.com
Hmm, odd.

I don't know why that would be the case.


Nikita Agrawal

unread,
Oct 31, 2014, 4:37:49 AM10/31/14
to ansible...@googlegroups.com
Any second thoughts on this are welcome..
Reply all
Reply to author
Forward
0 new messages