Merge #330 from wazuh/ansible

This commit is contained in:
Jose M 2019-11-25 18:11:27 +01:00
parent dc0aa448d0
commit f57840b2e7
3 changed files with 5 additions and 69 deletions

View File

@ -370,5 +370,8 @@ wazuh_agent_configs:
- location: 'System' - location: 'System'
format: 'eventlog' format: 'eventlog'
node_js_repo_url: nodesource.com/setup_8.x nodejs:
node_js_repo_type: rpm repo_dic:
debian: "deb"
redhat: "rpm"
repo_url_ext: "nodesource.com/setup_8.x"

View File

@ -49,37 +49,6 @@
- not wazuh_manager_sources_installation.enabled - not wazuh_manager_sources_installation.enabled
- not wazuh_api_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 - name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
set_fact: set_fact:
cis_distribution_filename: cis_debian_linux_rcl.txt cis_distribution_filename: cis_debian_linux_rcl.txt

View File

@ -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 - name: RedHat/CentOS 5 | Install Wazuh repo
yum_repository: yum_repository:
name: wazuh_repo name: wazuh_repo