Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #17 from Klaas-/Klaas--sles12fixes
Browse files Browse the repository at this point in the history
update params.pp for sles12
  • Loading branch information
kemra102 authored Nov 24, 2016
2 parents 2289fe2 + dc1c548 commit d4dea59
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ If **true** then **/etc/audit/rules.d/** will be managed by this module. This me

Defaults:

* EL7: `true`
* EL7/SLES12: `true`
* Others: `false`

#### `rules_file`
Expand Down
19 changes: 14 additions & 5 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,20 @@
}
'Suse': {
$package_name = 'audit'
$audisp_package = 'audispd-plugins'
$manage_audit_files = false
$rules_file = '/etc/audit/audit.rules'
$service_restart = '/etc/init.d/auditd restart'
$service_stop = '/etc/init.d/auditd stop'
if versioncmp($::operatingsystemrelease, '12') >= 0 and $::operatingsystem == 'SLES' {
$audisp_package = 'audit-audispd-plugins'
$manage_audit_files = true
$rules_file = '/etc/audit/rules.d/puppet.rules'
$service_restart = '/bin/systemctl restart auditd'
$service_stop = '/bin/systemctl stop auditd'
}
else {
$audisp_package = 'audispd-plugins'
$manage_audit_files = false
$rules_file = '/etc/audit/audit.rules'
$service_restart = '/etc/init.d/auditd restart'
$service_stop = '/etc/init.d/auditd stop'
}
}
'RedHat': {
$package_name = 'audit'
Expand Down
16 changes: 12 additions & 4 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
context 'default parameters on RedHat 7' do
let (:facts) {{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7',
:concat_basedir => '/var/lib/puppet/concat',
}}
Expand Down Expand Up @@ -39,6 +40,7 @@
context 'default parameters on RedHat 6' do
let (:facts) {{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6',
:concat_basedir => '/var/lib/puppet/concat',
}}
Expand All @@ -52,6 +54,7 @@
context 'default parameters on Amazon Linux' do
let (:facts) {{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7',
:operatingsystem => 'Amazon',
:concat_basedir => '/var/lib/puppet/concat',
Expand All @@ -66,6 +69,7 @@
context 'default parameters on Debian 8' do
let (:facts) {{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:lsbmajdistrelease => '8',
:concat_basedir => '/var/lib/puppet/concat',
}}
Expand All @@ -80,6 +84,7 @@
context 'default parameteres on Ubuntu 14.04' do
let (:facts) {{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystem => 'Ubuntu',
:lsbmajdistrelease => '14.04',
:concat_basedir => '/var/lib/puppet/concat',
Expand All @@ -94,8 +99,9 @@
end
context 'default parameters on Archlinux' do
let (:facts) {{
:osfamily => 'Archlinux',
:concat_basedir => '/var/lib/puppet/concat',
:osfamily => 'Archlinux',
:operatingsystem => 'Archlinux',
:concat_basedir => '/var/lib/puppet/concat',
}}
it {
should contain_package('audit')
Expand All @@ -107,8 +113,9 @@
end
context 'default parameters on Gentoo' do
let (:facts) {{
:osfamily => 'Gentoo',
:concat_basedir => '/var/lib/puppet/concat',
:osfamily => 'Gentoo',
:operatingsystem => 'Gentoo',
:concat_basedir => '/var/lib/puppet/concat',
}}
it {
should contain_package('audit')
Expand All @@ -121,6 +128,7 @@
context 'auditd.conf is well-formed' do
let (:facts) {{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '7',
}}
it {
Expand Down

0 comments on commit d4dea59

Please sign in to comment.