From c0ee0005fa8d151291929b93bf3461703d978841 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 5 Feb 2021 14:00:07 +0100 Subject: [PATCH] Update to 2021-02-05 14:00 --- roles/repo_nodejs/defaults/main.yml | 2 +- roles/repo_nodejs/tasks/main.yml | 8 ++------ roles/repo_nodejs/templates/nodejs.repo.j2 | 11 +++++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 roles/repo_nodejs/templates/nodejs.repo.j2 diff --git a/roles/repo_nodejs/defaults/main.yml b/roles/repo_nodejs/defaults/main.yml index 77ade19..546b9a2 100644 --- a/roles/repo_nodejs/defaults/main.yml +++ b/roles/repo_nodejs/defaults/main.yml @@ -1,3 +1,3 @@ --- -nodejs_major_version: 12 +nodejs_major_version: 13 diff --git a/roles/repo_nodejs/tasks/main.yml b/roles/repo_nodejs/tasks/main.yml index 72f77d0..dce11b2 100644 --- a/roles/repo_nodejs/tasks/main.yml +++ b/roles/repo_nodejs/tasks/main.yml @@ -1,10 +1,6 @@ --- - name: Configure NodeJS repository - yum_repository: - name: nodejs - description: Node.js Packages for Enterprise Linux - baseurl: https://rpm.nodesource.com/pub_{{ nodejs_major_version }}.x/el/7/$basearch - gpgcheck: True - gpgkey: https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL + template: src=nodejs.repo.j2 dest=/etc/yum.repos.d/nodejs.repo + tags: repo diff --git a/roles/repo_nodejs/templates/nodejs.repo.j2 b/roles/repo_nodejs/templates/nodejs.repo.j2 new file mode 100644 index 0000000..538c8ec --- /dev/null +++ b/roles/repo_nodejs/templates/nodejs.repo.j2 @@ -0,0 +1,11 @@ +[nodejs] +baseurl = https://rpm.nodesource.com/pub_{{ nodejs_major_version }}.x/el/{{ ansible_distribution_major_version }}/$basearch +gpgcheck = 1 +gpgkey = https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL +name = Node.js Packages for Enterprise Linux +{% if ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8', '>=') %} +# Workaround a bug in dnf which would make the default module mask +module_hotfixes = true +{% endif %} + +