First commit
This commit is contained in:
parent
51070053fb
commit
57542da42d
7 changed files with 92 additions and 0 deletions
3
defaults/main.yml
Normal file
3
defaults/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
wazuh_server: false
|
||||||
|
wazuh_client: false
|
||||||
7
files/yum.repo
Normal file
7
files/yum.repo
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
[wazuh_repo]
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
|
||||||
|
enabled=1
|
||||||
|
name=Wazuh repository
|
||||||
|
baseurl=https://packages.wazuh.com/3.x/yum/
|
||||||
|
protect=1
|
||||||
30
tasks/add_repo_Debian.yml
Normal file
30
tasks/add_repo_Debian.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
- name: Registering Ubuntu Atomic repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb https://updates.atomicorp.com/channels/atomic/ubuntu {{ ansible_distribution_name }}
|
||||||
|
filename: microsoft.list
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
mode: 0644
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
when:
|
||||||
|
- ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
- name: Registering Debian Atomic repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb https://updates.atomicorp.com/channels/atomic/debian {{ ansible_distribution_name }}
|
||||||
|
filename: microsoft.list
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
mode: 0644
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
when:
|
||||||
|
- ansible_distribution == "Debian"
|
||||||
|
|
||||||
|
- name: Install public repository GPG keys
|
||||||
|
apt_key:
|
||||||
|
url: https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt
|
||||||
|
state:
|
||||||
|
|
||||||
18
tasks/add_repo_RedHat.yml
Normal file
18
tasks/add_repo_RedHat.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Registering Wazuh repository
|
||||||
|
copy:
|
||||||
|
src: yum.repo
|
||||||
|
dest: /etc/yum.repos.d/wazuh.repo
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Retreive GPG Key
|
||||||
|
get_url:
|
||||||
|
url: https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt
|
||||||
|
dest: /etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
# https://updates.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/atomic-release-1.0-21.el7.art.noarch.rpm
|
||||||
20
tasks/main.yml
Normal file
20
tasks/main.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
- name: Include vars for {{ ansible_os_family }}
|
||||||
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
- name: Define repo for {{ ansible_os_family }}
|
||||||
|
include_tasks: add_repo_{{ ansible_os_family }}.yml
|
||||||
|
|
||||||
|
# -name: Need install NodeJS for wazuh API
|
||||||
|
|
||||||
|
- name: Install Wazuh server packages
|
||||||
|
package: name='{{ wazuh_server_packages }}' state=latest update_cache=yes
|
||||||
|
when:
|
||||||
|
- wazuh_server == true
|
||||||
|
|
||||||
|
# -name: Need to import role to install ELK
|
||||||
|
|
||||||
|
- name: Install Wazuh client packages
|
||||||
|
package: name='{{ wazuh_client_packages }}' state=latest update_cache=yes
|
||||||
|
when:
|
||||||
|
- wazuh_client == true
|
||||||
7
vars/Debian.yml
Normal file
7
vars/Debian.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
wazuh_server_packages:
|
||||||
|
- wazuh-manager
|
||||||
|
- wazuh-api
|
||||||
|
wazuh_client_packages:
|
||||||
|
- wazuh-agent
|
||||||
|
|
||||||
7
vars/RedHat.yml
Normal file
7
vars/RedHat.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
wazuh_server_packages:
|
||||||
|
- wazuh-manager
|
||||||
|
- wazuh-api
|
||||||
|
|
||||||
|
wazuh_client_packages:
|
||||||
|
- wazuh-agent
|
||||||
Loading…
Add table
Add a link
Reference in a new issue