diff options
author | 2023-04-12 21:30:57 +0000 | |
---|---|---|
committer | 2023-04-12 21:30:57 +0000 | |
commit | db0a935f0b3c53a58121fe4e2c6bb049ce74dc61 (patch) | |
tree | 512cc458e3e49960a8b429f16260d7ba45ff05f1 | |
parent | 7a91ceccce931ed999d762462017c8013ea23ec7 (diff) | |
parent | 47761bf26edcf425d7e8c9192d3d283aac63e376 (diff) |
Merge "Fix: Fix ansible steps to install NodeJS and NPM"
-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 |