adapted wazuh-manager installation so it takes into account the package version - Differentiating between CentOS/RedHat and Debian

This commit is contained in:
rshad 2019-07-09 15:31:38 +00:00
parent d56aa627ae
commit 5d006cbc3a
128 changed files with 194 additions and 31 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
.swp Normal file → Executable file
View File

0
.yamllint Normal file → Executable file
View File

0
CHANGELOG.md Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

0
Pipfile Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
VERSION Normal file → Executable file
View File

0
molecule/default/Dockerfile.j2 Normal file → Executable file
View File

0
molecule/default/INSTALL.rst Normal file → Executable file
View File

0
molecule/default/create.yml Normal file → Executable file
View File

0
molecule/default/destroy.yml Normal file → Executable file
View File

0
molecule/default/molecule.yml Normal file → Executable file
View File

0
molecule/default/playbook.yml Normal file → Executable file
View File

0
molecule/default/prepare.yml Normal file → Executable file
View File

2
molecule/default/tests/test_default.py Normal file → Executable file
View File

@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def get_wazuh_version():
"""This return the version of Wazuh."""
return "3.9.2"
return "3.9.0"
def test_wazuh_packages_are_installed(host):

0
molecule/elasticsearch/Dockerfile.j2 Normal file → Executable file
View File

0
molecule/elasticsearch/INSTALL.rst Normal file → Executable file
View File

48
molecule/elasticsearch/molecule.yml Normal file → Executable file
View File

@ -11,36 +11,36 @@ lint:
config-data:
ignore: .virtualenv
platforms:
- name: bionic
image: solita/ubuntu-systemd:bionic
command: /sbin/init
ulimits:
- nofile:262144:262144
privileged: true
memory_reservation: 1024m
- name: xenial
image: solita/ubuntu-systemd:xenial
privileged: true
memory_reservation: 1024m
command: /sbin/init
ulimits:
- nofile:262144:262144
- name: trusty
image: ubuntu:trusty
memory_reservation: 1024m
ulimits:
- nofile:262144:262144
# - name: bionic
# image: solita/ubuntu-systemd:bionic
# command: /sbin/init
# ulimits:
# - nofile:262144:262144
# privileged: true
# memory_reservation: 1024m
# - name: xenial
# image: solita/ubuntu-systemd:xenial
# privileged: true
# memory_reservation: 1024m
# command: /sbin/init
# ulimits:
# - nofile:262144:262144
#- name: trusty
#image: ubuntu:trusty
#memory_reservation: 1024m
#ulimits:
#- nofile:262144:262144
- name: centos6
image: centos:6
privileged: true
memory_reservation: 1024m
ulimits:
- nofile:262144:262144
- name: centos7
image: milcom/centos7-systemd
memory_reservation: 1024m
privileged: true
ulimits:
# - name: centos7
# image: milcom/centos7-systemd
# memory_reservation: 1024m
# privileged: true
# ulimits:
- nofile:262144:262144
provisioner:
name: ansible

0
molecule/elasticsearch/playbook.yml Normal file → Executable file
View File

0
molecule/elasticsearch/tests/test_default.py Normal file → Executable file
View File

View File

@ -0,0 +1,117 @@
<html>
<head>
<title>Unauthorized Request</title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="stylesheet" type="text/css" href="/errors/us/assets/hp-styles.css" />
<link rel="stylesheet" type="text/css" href="/errors/us/assets/master-master.css" />
<body style="margin: 0px" bgcolor=#ffffff>
<div id="banner">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" valign="middle" nowrap><a href="http://www.oracle.com"><img src="/errors/us/assets/oralogo-small.gif" width="154" height="19" hspace="10" vspace="25" border="0" ></a></td>
<td align="right" valign="top" width="70%" nowrap class="padMid"><div id="bannerMid"> </div></td>
<td width="30%" align="left" valign="bottom" nowrap></td>
</tr>
<tr>
<td align="right" valign="bottom" nowrap class="padMid"></td>
<td width="30%" align="left" valign="bottom" nowrap></td>
</tr>
</table>
</div>
<!-- Header END //-->
<table BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<tr>
<TD><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT=""></TD>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="15"></td>
</tr>
<tr>
<td><h1>Sorry!</h1></td>
</tr>
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="5"></td>
</tr>
<tr>
<td colspan="2">In order to download products from Oracle Technology
Network you must agree to the OTN license terms.</td>
</tr>
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="5"></td>
</tr>
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="5"></td>
</tr>
<tr>
<td colspan="2"><strong>Be sure that...</strong></td>
</tr>
<tr>
<td><img alt="" src="/errors/us/assets/004894.gif" height="7" vspace="3">
Your browser has "cookies" and JavaScript enabled.</td>
</tr>
<tr>
<td colspan="2"><img alt="" src="/errors/us/assets/004894.gif" height="7" vspace="3">
You clicked on "Accept License" for the product you wish to download.</td>
</tr>
<tr>
<td colspan="2"><img alt="" src="/errors/us/assets/004894.gif" height="7" vspace="3">
You attempt the download within 30 minutes of accepting the license.</td>
</tr>
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="5"></td>
</tr>
<tr>
<td colspan="2"><strong>From here you can go...</strong></td>
</tr>
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="5"></td>
</tr>
<tr>
<td><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" height="5"></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td align="right" valign="top" width="2%"><img src="/errors/us/assets/004894.gif" height="7" vspace="3"></td>
<td><a href="javascript:history.back(-1)">Back to Previous Page</a></td>
</tr>
<tr valign="middle">
<td align="right" valign="top"><img src="/errors/us/assets/004894.gif" height="7" vspace="3"></td>
<td><a href="http://www.oracle.com/us/sitemaps/index.html#otn">Site Map</a></td>
</tr>
<tr valign="middle">
<td align="right" valign="top"><img src="/errors/us/assets/004894.gif" height="7" vspace="3"></td>
<td><a href="http://www.oracle.com/technetwork/index.html">OTN Homepage</a></td>
</tr>
</table>
<br>
<div id="footer">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" class="legalese" align="right" valign="top">&nbsp;</td>
<td width="50%" class="legalese" align="left" valign="top" >&nbsp;</td>
</tr>
<tr>
<td width="50%" class="legalese" align="left" valign="top">&nbsp;</td>
<td width="50%" class="legalese" align="right" valign="top"><a class=legalese href="http://www.oracle.com/rss/index.html" target="_top">RSS <img src="/errors/us/assets/feed-icon-14x14.png" width="14" height="14" border="0"></A><span class=navlink> | </span> <a class=legalese href="http://www.oracle.com/html/copyright.html" target="_top">Legal Notices and Terms for Use</a><span class=navlink> | </span> <a class=legalese href="http://www.oracle.com/html/privacy.html" target="_top">Privacy Statement</a><br />
</td>
</tr>
<tr>
<td width="50%" class="legalese" align="right" valign="top">&nbsp;</td>
<td width="50%" class="legalese" align="left" valign="top" ></td>
</tr>
</table>
</div>
</td>
<TD WIDTH="10"><IMG SRC="/errors/us/assets/spacer.gif" BORDER=0 ALT="" WIDTH="10"></TD>
</tr>
</table>
</body>
</html>

0
molecule/filebeat/Dockerfile.j2 Normal file → Executable file
View File

0
molecule/filebeat/INSTALL.rst Normal file → Executable file
View File

0
molecule/filebeat/molecule.yml Normal file → Executable file
View File

0
molecule/filebeat/playbook.yml Normal file → Executable file
View File

0
molecule/filebeat/prepare.yml Normal file → Executable file
View File

0
molecule/filebeat/tests/test_default.py Normal file → Executable file
View File

0
molecule/kibana/Dockerfile.j2 Normal file → Executable file
View File

0
molecule/kibana/INSTALL.rst Normal file → Executable file
View File

0
molecule/kibana/molecule.yml Normal file → Executable file
View File

0
molecule/kibana/playbook.yml Normal file → Executable file
View File

0
molecule/kibana/prepare.yml Normal file → Executable file
View File

0
molecule/kibana/tests/test_default.py Normal file → Executable file
View File

0
molecule/wazuh-agent/Dockerfile.j2 Normal file → Executable file
View File

0
molecule/wazuh-agent/INSTALL.rst Normal file → Executable file
View File

0
molecule/wazuh-agent/molecule.yml Normal file → Executable file
View File

0
molecule/wazuh-agent/playbook.yml Normal file → Executable file
View File

0
molecule/wazuh-agent/prepare.yml Normal file → Executable file
View File

0
molecule/wazuh-agent/tests/test_agents.py Normal file → Executable file
View File

0
molecule/wazuh-agent/tests/test_manager.py Normal file → Executable file
View File

0
playbooks/wazuh-agent.yml Normal file → Executable file
View File

0
playbooks/wazuh-elastic.yml Normal file → Executable file
View File

0
playbooks/wazuh-elastic_stack-distributed.yml Normal file → Executable file
View File

0
playbooks/wazuh-elastic_stack-single.yml Normal file → Executable file
View File

0
playbooks/wazuh-kibana.yml Normal file → Executable file
View File

0
playbooks/wazuh-manager.yml Normal file → Executable file
View File

0
roles/ansible-galaxy/meta/main.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-elasticsearch/README.md Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -197,7 +197,7 @@
when:
- elasticsearch_xpack_security
- name: Reload systemd
- name: Distribution != one of [ centos 6.*, trusty ] | Reload systemd
systemd: daemon_reload=true
ignore_errors: true
when:
@ -205,12 +205,37 @@
- not (ansible_distribution == "Ubuntu" and ansible_distribution_version is version('15.04', '<'))
- not (ansible_distribution == "Debian" and ansible_distribution_version is version('8', '<'))
- not (ansible_os_family == "RedHat" and ansible_distribution_version is version('7', '<'))
- name: Get Java version
shell: java -version |& awk -F'"' '{print $2}'
register: java_version
- debug: msg="{{ java_version.stdout_lines }}"
- name: "Install Java Repo for Trusty"
yum_repository: repo='ppa:openjdk-r/ppa'
when:
- ansible_distribution in ['CentOS', 'RedHat'] and ansible_distribution_major_version|int < 7
- name: Distribution is centos 6.* | Enable Elasticsearch
service: name=elasticsearch enabled=yes
- name: Distribution is centos 6.* | Reload Elasticsearch
service: name=elasticsearch state=reloaded
- name: Distribution is centos 6.* | Start Elasticsearch
service: name=elasticsearch state=started
- name: Ensure Elasticsearch started and enabled
service:
name: elasticsearch
enabled: true
state: started
# ignore_errors: true
# when:
# - not (ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA")
# - not (ansible_distribution == "Ubuntu" and ansible_distribution_version is version('15.04', '<'))
# - not (ansible_distribution == "Debian" and ansible_distribution_version is version('8', '<'))
# - not (ansible_os_family == "RedHat" and ansible_distribution_version is version('7', '<'))
- name: Make sure Elasticsearch is running before proceeding
wait_for: host={{ elasticsearch_network_host }} port={{ elasticsearch_http_port }} delay=3 timeout=300

View File

View File

0
roles/elastic-stack/ansible-kibana/README.md Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/defaults/main.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/handlers/main.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/meta/main.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/tasks/Debian.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/tasks/RMDebian.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/tasks/RMRedHat.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/tasks/RedHat.yml Normal file → Executable file
View File

0
roles/elastic-stack/ansible-kibana/tasks/main.yml Normal file → Executable file
View File

View File

0
roles/wazuh/ansible-filebeat/README.md Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/defaults/main.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/handlers/main.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/meta/main.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tasks/Debian.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tasks/RMDebian.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tasks/RMRedHat.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tasks/RedHat.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tasks/config.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tasks/main.yml Normal file → Executable file
View File

View File

0
roles/wazuh/ansible-filebeat/templates/filebeat.yml.j2 Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tests/requirements.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-filebeat/tests/test.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/README.md Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/defaults/main.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/handlers/main.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/meta/main.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/Debian.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/Linux.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/RMDebian.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/RMRedHat.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/RedHat.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/Windows.yml Normal file → Executable file
View File

0
roles/wazuh/ansible-wazuh-agent/tasks/main.yml Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More