Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Linux support #67

Merged
merged 3 commits into from
Oct 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible-role-elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
- name: Reload systemd
systemd: daemon_reload=yes
ignore_errors: yes
when: not (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: Ensure Elasticsearch started and enabled
service:
Expand Down
2 changes: 1 addition & 1 deletion ansible-role-filebeat/tasks/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: RedHat/CentOS/Fedora | Install Filebeats repo
- name: RedHat/CentOS/Fedora/Amazon Linux | Install Filebeats repo
yum_repository:
name: elastic_repo
description: Elastic repository for 6.x packages
Expand Down
1 change: 1 addition & 0 deletions ansible-role-filebeat/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- name: Reload systemd
systemd: daemon_reload=yes
ignore_errors: yes
when: not (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: Ensure Filebeat is started and enabled at boot.
service:
Expand Down
1 change: 1 addition & 0 deletions ansible-role-kibana/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- name: Reload systemd
systemd: daemon_reload=yes
ignore_errors: yes
when: not (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: Kibana configuration
template:
Expand Down
1 change: 1 addition & 0 deletions ansible-role-logstash/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- name: Reload systemd
systemd: daemon_reload=yes
ignore_errors: yes
when: not (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: Ensure Logstash started and enabled
service:
Expand Down
12 changes: 11 additions & 1 deletion ansible-wazuh-agent/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
when:
- ansible_distribution_major_version|int == 5

- name: AmazonLinux | Install Wazuh repo
yum_repository:
name: wazuh_repo
description: Wazuh repository
baseurl: https://packages.wazuh.com/3.x/yum/
gpgkey: https://packages.wazuh.com/key/GPG-KEY-WAZUH
gpgcheck: yes
when:
- ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA"

- name: RedHat/CentOS/Fedora | download Oracle Java RPM
get_url:
url: http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jre-8u171-linux-x64.rpm
Expand Down Expand Up @@ -53,7 +63,7 @@
- name: Set Distribution CIS filename for RHEL7
set_fact:
cis_distribution_filename: cis_rhel7_linux_rcl.txt
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"
when: (ansible_os_family == "RedHat" and ansible_distribution_major_version == "7") or (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: RedHat/CentOS/RedHat | Install openscap
package: name=openscap-scanner state=present
Expand Down
21 changes: 18 additions & 3 deletions ansible-wazuh-manager/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
gpgcheck: yes
when: ansible_distribution == 'Fedora'

- name: AmazonLinux | Get Nodejs
shell: curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
args:
warn: no
when:
- ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA"

- name: AmazonLinux | Install Nodejs repo
yum:
name: nodejs
state: present
when:
- ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA"

- name: RedHat/CentOS/Fedora | Install Wazuh repo
yum_repository:
name: wazuh_repo
Expand All @@ -26,7 +40,7 @@
gpgkey: https://packages.wazuh.com/key/GPG-KEY-WAZUH
gpgcheck: yes
when:
- ansible_distribution_major_version|int > 5
- (ansible_distribution_major_version|int > 5) or (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: RedHat/CentOS 5 | Install Wazuh repo
yum_repository:
Expand All @@ -36,12 +50,13 @@
gpgkey: https://packages.wazuh.com/key/GPG-KEY-WAZUH
gpgcheck: yes
when:
- ansible_distribution_major_version|int < 6
- ansible_distribution_major_version|int == 5

- name: RedHat/CentOS/Fedora | Install openscap
package: name=openscap-scanner state=present
tags:
- init
when: not (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")

- name: CentOS 6 | Install Software Collections (SCL) Repository
package: name=centos-release-scl state=present
Expand Down Expand Up @@ -113,4 +128,4 @@
- name: Set Distribution CIS filename for RHEL7/CentOS-7
set_fact:
cis_distribution_filename: cis_rhel7_linux_rcl.txt
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == '7'
when: (ansible_os_family == "RedHat" and ansible_distribution_major_version == '7') or (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")
2 changes: 1 addition & 1 deletion ansible-wazuh-manager/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- import_tasks: "RedHat.yml"
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int > 5
when: (ansible_os_family == "RedHat" and ansible_distribution_major_version|int > 5) or (ansible_os_family == "RedHat" and ansible_distribution == "Amazon")

- import_tasks: "Debian.yml"
when: ansible_os_family == "Debian"
Expand Down