Skip to content

Commit

Permalink
Node.js role: force installation of the latest npm version
Browse files Browse the repository at this point in the history
  • Loading branch information
LeBenLeBen committed Jan 1, 2019
1 parent 781c4f4 commit 4fc0ffd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ For migration information, you can always have a look at https://liip-drifter.re
- Make ansible version in the guest configurable via parameters.yml
- Django role: download and enable bash completion for django commands
- Node.js role: allow to disable package.json creation with new parameter `nodejs_create_package_json`
- Node.js role: force installation of the latest npm version

### Changed

Expand Down
7 changes: 7 additions & 0 deletions provisioning/roles/nodejs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,23 @@
- name: Make sure APT supports HTTPS sources
apt: pkg=apt-transport-https state=present
become: yes

- name: Add nodesource.com apt key
apt_key: id=68576280 url=https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280 state=present
become: yes

- name: Add nodesource.com apt repo
apt_repository: repo='deb https://deb.nodesource.com/node_{{ nodejs_version }} {{ nodejs_distro}} main' state=present update_cache=yes
become: yes

- name: Install nodejs
apt: name=nodejs state=present
become: yes

- name: Install the latest npm version available
npm: name=npm global=yes state=latest
become: yes

- name: Add Yarn apt key
apt_key: url=https://dl.yarnpkg.com/debian/pubkey.gpg
become: yes
Expand Down

0 comments on commit 4fc0ffd

Please sign in to comment.