bcen / ansible-nodejs

Ansible role for node js
1 stars 0 forks source link

Nodejs fails to install #1

Open nederdirk opened 10 years ago

nederdirk commented 10 years ago

when installing nodejs from this galaxy module, ansible (1.5.3) fails, because the GPG key with which the nodejs package is signed is not added to the installed box's key store.

This error is produced:

TASK: [nodejs | install package] ********************************************** 
failed: [default] => {"failed": true, "item": ""}
stderr: E: There are problems and -y was used without --force-yes

stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  rlwrap
The following NEW packages will be installed:
  nodejs rlwrap
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5700 kB of archives.
After this operation, 17.3 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  nodejs

msg: 'apt-get install 'nodejs' ' failed: E: There are problems and -y was used without --force-yes

I think the error can be circumvented by adding force=yes to the apt-task (possibly insecure), or by adding the key (http://keyserver.ubuntu.com:11371/pks/lookup?search=0x136221EE520DDFAF0A905689B9316A7BC7917B12&op=index) to the provisioned machine's apt-key store (with an apt-key task)

bcen commented 10 years ago

Thanks, will look into it

geerlingguy commented 9 years ago

See, for an example: https://github.com/geerlingguy/ansible-role-nodejs/blob/a81202aef58771b76fba04092fd257b68a010c07/tasks/setup-Debian.yml#L6-L9