summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packer/provision/local-docker.yaml19
1 files changed, 19 insertions, 0 deletions
diff --git a/packer/provision/local-docker.yaml b/packer/provision/local-docker.yaml
index 32aa2c307..c86f1e14c 100644
--- a/packer/provision/local-docker.yaml
+++ b/packer/provision/local-docker.yaml
@@ -194,6 +194,25 @@
update_cache: yes
state: fixed
become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+
+ - name: Install nodejs and npm
+ 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'
+ command: npm --version
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install npm build tools
+ apt:
+ name: build-essential
+ update_cache: yes
+ state: fixed
+ become: true
when: ansible_distribution == 'Ubuntu'
- name: npm self-update