X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=packer%2Fprovision%2Flocal-docker.yaml;h=c86f1e14c3a70b8d9d829a72b9fdf93acc811243;hb=47761bf26edcf425d7e8c9192d3d283aac63e376;hp=32aa2c3070410a277b24f037dece241bb8e9636d;hpb=1a5edf22e104200c3bd16b17b2b6662f6e814118;p=ci-management.git 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