Skip to content
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.

### Added

- None
- Add Rocky Linux support. ([#1438](https://github.com/wazuh/wazuh-puppet/pull/1438))

### Changed

Expand Down
11 changes: 11 additions & 0 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,17 @@
$apply_template_os = 'centos'
} 'SLES':{
$apply_template_os = 'suse'
} 'Rocky':{
$apply_template_os = 'rhel'
if ( $facts['os']['release']['full'] =~ /^10.*/ ) {
$rhel_version = '10'
}
elsif ( $facts['os']['release']['full'] =~ /^9.*/ ) {
$rhel_version = '9'
}
elsif ( $facts['os']['release']['full'] =~ /^8.*/ ) {
$rhel_version = '8'
}
}
default: { fail('OS not supported') }
}
Expand Down
9 changes: 5 additions & 4 deletions manifests/filebeat_oss.pp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@
}

service { 'filebeat':
ensure => running,
enable => true,
name => $filebeat_oss_service,
require => Package['filebeat'],
ensure => running,
enable => true,
name => $filebeat_oss_service,
require => Package['filebeat'],
provider => 'systemd',
}
}
9 changes: 5 additions & 4 deletions manifests/indexer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@
}

service { 'wazuh-indexer':
ensure => running,
enable => true,
name => $indexer_service,
require => Package['wazuh-indexer'],
ensure => running,
enable => true,
name => $indexer_service,
require => Package['wazuh-indexer'],
provider => 'systemd',
}

file_line { "Insert line limits nofile for ${indexer_fileuser}":
Expand Down
16 changes: 14 additions & 2 deletions manifests/manager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@
}
}
service { 'auditd':
ensure => running,
enable => true,
ensure => running,
enable => true,
provider => 'systemd',
}
}

Expand Down Expand Up @@ -400,6 +401,17 @@
$apply_template_os = 'amazon'
} 'CentOS','Centos','centos':{
$apply_template_os = 'centos'
} 'Rocky':{
$apply_template_os = 'rhel'
if ( $facts['os']['release']['full'] =~ /^10.*/ ) {
$rhel_version = '10'
}
elsif ( $facts['os']['release']['full'] =~ /^9.*/ ) {
$rhel_version = '9'
}
elsif ( $facts['os']['release']['full'] =~ /^8.*/ ) {
$rhel_version = '8'
}
}
default: { fail('This ossec module has not been tested on your distribution') }
}
Expand Down
10 changes: 8 additions & 2 deletions manifests/params_agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,18 @@
}
'AlmaLinux': {
if ( $facts['os']['release']['full'] =~ /^8.*/ ) {
$ossec_service_provider = 'redhat'
$ossec_service_provider = 'systemd'
}
}
'Rocky': {
if ( $facts['os']['release']['full'] =~ /^8.*/ ) {
$ossec_service_provider = 'redhat'
$ossec_service_provider = 'systemd'
}
if ( $facts['os']['release']['full'] =~ /^9.*/ ) {
$ossec_service_provider = 'systemd'
}
if ( $facts['os']['release']['full'] =~ /^10.*/ ) {
$ossec_service_provider = 'systemd'
}
}
default: { fail('This ossec module has not been tested on your distribution') }
Expand Down
18 changes: 16 additions & 2 deletions manifests/params_manager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,22 @@
}
'AlmaLinux': {
if ( $facts['os']['release']['full'] =~ /^8.*/ ) {
$ossec_service_provider = 'redhat'
$api_service_provider = 'redhat'
$ossec_service_provider = 'systemd'
$api_service_provider = 'systemd'
}
}
'Rocky': {
if ( $facts['os']['release']['full'] =~ /^8.*/ ) {
$ossec_service_provider = 'systemd'
$api_service_provider = 'systemd'
}
if ( $facts['os']['release']['full'] =~ /^9.*/ ) {
$ossec_service_provider = 'systemd'
$api_service_provider = 'systemd'
}
if ( $facts['os']['release']['full'] =~ /^10.*/ ) {
$ossec_service_provider = 'systemd'
$api_service_provider = 'systemd'
}
}
default: { fail('This ossec module has not been tested on your distribution') }
Expand Down
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
# Set up OSSEC repo
case $facts['os'][name] {
/^(CentOS|RedHat|OracleLinux|Fedora|Amazon|AlmaLinux)$/: {
/^(CentOS|RedHat|OracleLinux|Fedora|Amazon|AlmaLinux|Rocky)$/: {
yumrepo { 'wazuh':
descr => 'WAZUH OSSEC Repository - www.wazuh.com',
enabled => true,
Expand Down
11 changes: 10 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@
"5",
"6",
"7",
"8"
"8",
"9"
]
},
{
"operatingsystem": "Rocky",
"operatingsystemrelease": [
"8",
"9",
"10"
]
},
{
Expand Down
Loading