Update NodJS installation tasks
This commit is contained in:
parent
4dd780504b
commit
3c70bc5b2a
@ -1,25 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: RedHat/CentOS | Install Nodejs repo
|
- name: Centos | Get Nodejs
|
||||||
yum_repository:
|
|
||||||
name: NodeJS
|
|
||||||
description: NodeJS-$releasever
|
|
||||||
baseurl: https://rpm.nodesource.com/pub_6.x/el/{{ ansible_distribution_major_version }}/x86_64
|
|
||||||
gpgkey: https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
|
|
||||||
gpgcheck: true
|
|
||||||
changed_when: false
|
|
||||||
when:
|
|
||||||
- ansible_distribution_major_version|int > 5
|
|
||||||
|
|
||||||
- name: Fedora | Install Nodejs repo
|
|
||||||
yum_repository:
|
|
||||||
name: NodeJS
|
|
||||||
description: NodeJS-$releasever
|
|
||||||
baseurl: https://rpm.nodesource.com/pub_6.x/fc/$releasever/x86_64
|
|
||||||
gpgkey: https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
|
|
||||||
gpgcheck: true
|
|
||||||
when: ansible_distribution == 'Fedora'
|
|
||||||
|
|
||||||
- name: AmazonLinux | Get Nodejs
|
|
||||||
shell: |
|
shell: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
|
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
|
||||||
@ -27,8 +7,28 @@
|
|||||||
warn: false
|
warn: false
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
creates: /etc/yum.repos.d/nodesource-el7.repo
|
creates: /etc/yum.repos.d/nodesource-el7.repo
|
||||||
|
when:
|
||||||
|
- ansible_distribution_major_version|int > 5
|
||||||
|
|
||||||
|
- name: AmazonLinux/Fedora| Get Nodejs
|
||||||
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
|
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
executable: /bin/bash
|
||||||
when:
|
when:
|
||||||
- ansible_distribution|lower == "amazon"
|
- ansible_distribution|lower == "amazon"
|
||||||
|
- ansible_distribution == 'Fedora'
|
||||||
|
|
||||||
|
- name: CentOS/RedHat/Amazon/Fedora | Install NodeJS
|
||||||
|
package:
|
||||||
|
name: "nodejs"
|
||||||
|
state: present
|
||||||
|
register: nodejs_is_installed
|
||||||
|
until: nodejs_is_installed is succeeded
|
||||||
|
tags:
|
||||||
|
- init
|
||||||
|
|
||||||
- name: RedHat/CentOS 5 | Install Wazuh repo
|
- name: RedHat/CentOS 5 | Install Wazuh repo
|
||||||
yum_repository:
|
yum_repository:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user