summaryrefslogtreecommitdiffstats
path: root/packer/provision/local-docker.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'packer/provision/local-docker.yaml')
-rw-r--r--packer/provision/local-docker.yaml65
1 files changed, 31 insertions, 34 deletions
diff --git a/packer/provision/local-docker.yaml b/packer/provision/local-docker.yaml
index 885996101..3d7877569 100644
--- a/packer/provision/local-docker.yaml
+++ b/packer/provision/local-docker.yaml
@@ -10,7 +10,7 @@
glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c
glide_version: v0.13.1
golang_version: 1.9.1
- npm_version: "6.14.13"
+ npm_version: "9.6.4"
tasks:
- name: "Checking for x86_64"
@@ -115,24 +115,6 @@
become: true
when: ansible_distribution == 'Ubuntu'
- - name: Install nodejs-dev libssl1.0-dev dep
- apt:
- name:
- - libssl1.0-dev
- update_cache: yes
- state: fixed
- become: true
- when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
-
- - name: Install nodejs-dev dep for npm
- apt:
- name:
- - nodejs-dev
- update_cache: yes
- state: fixed
- become: true
- when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
-
- name: Install supporting packages (Ubuntu 18.04)
apt:
name:
@@ -177,22 +159,37 @@
become: true
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
- - name: Install npm and addon packages
- apt:
- name:
- - nodejs
- - npm
- - node-gyp
- update_cache: yes
- state: fixed
- become: true
- when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+ - name: Install nodejs
+ block:
+ - name: install nodejs prerequisites
+ apt:
+ name:
+ - apt-transport-https
+ - g++
+ update_cache: yes
+ state: present
+ become: true
+ - name: add nodejs apt key
+ apt_key:
+ url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
+ state: present
+ become: true
+ - name: add nodejs repository
+ apt_repository:
+ repo: deb https://deb.nodesource.com/node_19.x {{ ansible_distribution_release }} main
+ state: present
+ update_cache: yes
+ become: true
+ - name: install nodejs
+ apt:
+ name:
+ - nodejs
+ state: present
+ become: true
+ when: ansible_distribution == 'Ubuntu'
- - name: Install nodejs and npm
+ - name: Check nodejs and npm versions
block:
- - name: 'Pull latest nodejs version'
- command: 'curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && sudo apt-get install -y nodejs'
- become: yes
- name: 'Check nodejs version'
command: node --version
- name: 'Check npm version'
@@ -270,7 +267,7 @@
- name: Download and install libssl Ubuntu 20.04
apt:
- deb: http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.10_amd64.deb
+ deb: http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.11_amd64.deb
become: true
when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'