+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
+
+ - name: Install npm and addon packages
+ apt:
+ name:
+ - nodejs
+ - npm
+ - node-gyp
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: npm self-update
+ command: npm install npm@{{ npm_version }} -g
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: npm install n module
+ command: npm install n -g
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Upgrade latest stable node version
+ command: n stable | PATH="$PATH"