Merge #330 from wazuh/ansible
This commit is contained in:
parent
dc0aa448d0
commit
f57840b2e7
@ -370,5 +370,8 @@ wazuh_agent_configs:
|
||||
- location: 'System'
|
||||
format: 'eventlog'
|
||||
|
||||
node_js_repo_url: nodesource.com/setup_8.x
|
||||
node_js_repo_type: rpm
|
||||
nodejs:
|
||||
repo_dic:
|
||||
debian: "deb"
|
||||
redhat: "rpm"
|
||||
repo_url_ext: "nodesource.com/setup_8.x"
|
||||
@ -49,37 +49,6 @@
|
||||
- not wazuh_manager_sources_installation.enabled
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Installing NodeJS repository key (Ubuntu 14)
|
||||
become: true
|
||||
shell: |
|
||||
set -o pipefail
|
||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
||||
args:
|
||||
warn: false
|
||||
executable: /bin/bash
|
||||
changed_when: false
|
||||
when:
|
||||
- ansible_distribution == "Ubuntu"
|
||||
- ansible_distribution_major_version | int == 14
|
||||
- not wazuh_manager_sources_installation.enabled
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Installing NodeJS repository key
|
||||
apt_key:
|
||||
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
|
||||
when:
|
||||
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Add NodeSource repositories for Node.js
|
||||
apt_repository:
|
||||
repo: "deb https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
update_cache: true
|
||||
changed_when: false
|
||||
when:
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
|
||||
set_fact:
|
||||
cis_distribution_filename: cis_debian_linux_rcl.txt
|
||||
|
||||
@ -1,40 +1,4 @@
|
||||
---
|
||||
|
||||
- name: RedHat/CentOS | Install Nodejs repo
|
||||
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
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- 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'
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- name: AmazonLinux | Get Nodejs
|
||||
shell: |
|
||||
set -o pipefail
|
||||
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
|
||||
args:
|
||||
warn: false
|
||||
executable: /bin/bash
|
||||
creates: /etc/yum.repos.d/nodesource-el7.repo
|
||||
when:
|
||||
- ansible_distribution|lower == "amazon"
|
||||
- not wazuh_api_sources_installation.enabled
|
||||
|
||||
- name: RedHat/CentOS 5 | Install Wazuh repo
|
||||
yum_repository:
|
||||
name: wazuh_repo
|
||||
|
||||
Loading…
Reference in New Issue
Block a user