From: Bengt Thuree Date: Wed, 12 Apr 2023 21:30:57 +0000 (+0000) Subject: Merge "Fix: Fix ansible steps to install NodeJS and NPM" X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=db0a935f0b3c53a58121fe4e2c6bb049ce74dc61;hp=7a91ceccce931ed999d762462017c8013ea23ec7;p=ci-management.git Merge "Fix: Fix ansible steps to install NodeJS and NPM" --- 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