diff options
author | Jessica Wagantall <jwagantall@linuxfoundation.org> | 2023-04-12 11:43:26 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@linuxfoundation.org> | 2023-04-12 11:43:26 -0700 |
commit | 47761bf26edcf425d7e8c9192d3d283aac63e376 (patch) | |
tree | 3eb76daa35aa685d2a381fb95ab59b5ee06bef3d /packer | |
parent | 1a5edf22e104200c3bd16b17b2b6662f6e814118 (diff) |
Fix: Fix ansible steps to install NodeJS and NPM
Restructure NodeJS and NPM installation for 20.04
https://github.com/nodesource/distributions
Issue-ID: CIMAN-33
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: I27d9f31d798c231a6b19c40cf8c4753bf1d3935d
Diffstat (limited to 'packer')
-rw-r--r-- | packer/provision/local-docker.yaml | 19 |
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 |