File tree Expand file tree Collapse file tree 1 file changed +6
-23
lines changed Expand file tree Collapse file tree 1 file changed +6
-23
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- - name : Set up the Nodesource RPM directory.
3
- set_fact :
4
- nodejs_rhel_rpm_dir : " pub_{{ nodejs_version }}"
5
-
6
- - name : Import Nodesource RPM key (CentOS < 7).
2
+ - name : Import Nodesource RPM key.
7
3
rpm_key :
8
- key : http://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
9
- state : present
10
- when : ansible_distribution_major_version | int < 7
11
-
12
- - name : Import Nodesource RPM key (CentOS 7+).
13
- rpm_key :
14
- key : https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
15
- state : present
16
- when : ansible_distribution_major_version | int >= 7
17
-
18
- - name : Add Nodesource repositories for Node.js (CentOS < 7).
19
- yum :
20
- name : " http://rpm.nodesource.com/{{ nodejs_rhel_rpm_dir }}/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm"
4
+ key : https://rpm.nodesource.com/gpgkey/nodesource.gpg.key
21
5
state : present
22
- when : ansible_distribution_major_version | int < 7
23
- register : node_repo
24
6
25
- - name : Add Nodesource repositories for Node.js (CentOS 7+) .
7
+ - name : Add Nodesource repositories for Node.js.
26
8
yum :
27
- name : " https://rpm.nodesource.com/{{ nodejs_rhel_rpm_dir }}/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm"
9
+ name : " https://rpm.nodesource.com/pub_ {{ nodejs_version }}/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm"
28
10
state : present
29
11
when : ansible_distribution_major_version | int >= 7
30
12
register : node_repo
31
13
32
14
- name : Update package cache if repo was added.
33
- yum : update_cache=yes
15
+ yum :
16
+ update_cache : true
34
17
when : node_repo is changed
35
18
tags : ['skip_ansible_lint']
36
19
You can’t perform that action at this time.
0 commit comments