ansible-roles/nodejs/tasks/main.yml
Benoît S. 771c75c1de
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build is passing
all-roles: Dot not use ansible_lsb as it is deprecated
We move from `ansible_lsb.codename` to `ansible_distribution_release`.
2019-07-03 09:41:35 +02:00

41 lines
819 B
YAML

---
- name: APT https transport is enabled
apt:
name: apt-transport-https
state: present
tags:
- system
- packages
- name: NodeJS GPG key is installed
apt_key:
# url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
data: "{{ lookup('file', 'nodesource.gpg.key') }}"
tags:
- system
- packages
- nodejs
- name: NodeJS sources list ({{ nodejs_apt_version }}) is available
apt_repository:
repo: "deb https://deb.nodesource.com/{{ nodejs_apt_version }} {{ ansible_distribution_release }} main"
filename: nodesource
update_cache: yes
state: present
tags:
- system
- packages
- nodejs
- name: NodeJS is installed
apt:
name: nodejs
state: present
tags:
- packages
- nodejs
- include: yarn.yml
when: nodejs_install_yarn