]> arthur.barton.de Git - AnsibleRoles.git/blob - roles/nodejs/tasks/main.yml
7c72f00e20fe72e2401f4d5f796bff71fd3849e4
[AnsibleRoles.git] / roles / nodejs / tasks / main.yml
1 ---
2 # tasks file for nodejs
3
4 - name: install "apt-transport-https" and "ca-certificates"
5   tags:
6     - nodejs
7     - packages
8   apt:
9     name: "{{ item }}"
10     state: present
11   with_items:
12     - apt-transport-https
13     - ca-certificates
14   when: nodejs_apt_repository.startswith("https://")
15
16 - name: install Node.js repository GnuPG key
17   tags:
18     - nodejs
19     - packages
20   copy:
21     dest: /etc/apt/trusted.gpg.d/
22     group: root
23     mode: 0644
24     owner: root
25     src: nodejs.gpg
26   notify:
27     - update APT repositories
28
29 - name: install Node.js repository configuration
30   tags:
31     - nodejs
32     - packages
33   template:
34     dest: /etc/apt/sources.list.d/nodejs.list
35     group: root
36     mode: 0644
37     owner: root
38     src: nodejs.list.j2
39   notify:
40     - update APT repositories
41
42 - meta: flush_handlers
43   tags:
44     - nodejs
45     - packages
46
47 - name: install "npm"
48   tags:
49     - nodejs
50     - packages
51   apt:
52     name: npm
53     state: present