ansible/roles/nodejs/tasks/main.yml
Hadrien Patte 737ca7b996
Feat: add state
Signed-off-by: Hadrien Patte <hadrien.patte@protonmail.com>
2019-03-23 20:05:42 +01:00

21 lines
457 B
YAML

---
- name: Configure NodeJS pin
when:
- ansible_distribution == 'Debian'
- ansible_distribution_release == 'stretch'
template:
src: apt/nodejs.j2
dest: /etc/apt/preferences.d/nodejs
mode: 0644
- name: Install required packages
apt:
update_cache: true
name:
- nodejs
- npm
- build-essential # To build npm packages
state: present
register: apt_result
retries: 3
until: apt_result is succeeded