Friday, 2 June 2017

Ansible: force installing latest nodejs package

I don't understand why Ansible is installing an old version of nodejs even though I set it to install latest:

- name: NodeJS => Install NodeJS
  apt:
      pkg: ""
      state: latest
      force: yes
      update_cache: yes
  with_items:
    - nodejs
    - npm
  become: yes

- name: NodeJS => Create link symlink for node
  become: yes
  file:
    src: /usr/bin/nodejs
    dest: /usr/bin/node
    state: link

For the current versions I have now:

$ node -v
v0.10.25

$ npm -v
1.3.10



via numediaweb

No comments:

Post a Comment