ansible-role-nodejs/tasks/main.yml

22 lines
449 B
YAML
Raw Normal View History

2023-08-13 07:20:47 +00:00
---
- name: Install npm and yarn (Debian)
2023-08-13 07:20:47 +00:00
import_tasks: Debian.yml
when: ansible_os_family == 'Debian'
- name: Install npm and yarn (non-Debian)
2023-08-13 07:20:47 +00:00
ansible.builtin.package:
name:
- nodejs
- yarn
2023-08-13 07:20:47 +00:00
state: present
when: ansible_os_family != 'Debian'
- name: Install npm requirements
ansible.builtin.npm:
name: "{{ item }}"
global: yes
state: present
loop: "{{ npm_packages }}"
when: npm_packages is defined