Skip to content

Commit

Permalink
fix amazon linux repo url and auditd disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
nate st. germain committed Feb 8, 2019
1 parent 12903cb commit 7386aa3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
class { $::threatstack::repo_class: }

if $::threatstack::disable_auditd {
service { 'auditd':
ensure => 'stopped',
enable => false
exec { 'stop_auditd':
command => '/sbin/service auditd stop',
onlyif => '/sbin/service auditd status'
}
$required = [ Class[$::threatstack::repo_class], Service['auditd'] ]

exec { 'disable_auditd':
command => '/bin/systemctl disable auditd',
require => Exec['stop_auditd']
}

$required = [ Class[$::threatstack::repo_class], Exec['stop_auditd'] ]
} else {
$required = Class[$::threatstack::repo_class]
}
Expand All @@ -37,5 +43,4 @@
ensure => $::threatstack::package_version,
require => $required
}

}
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

case $facts['os']['name'] {
'Amazon': {
$repo_url = 'https://pkg.threatstack.com/v2/Amazon'
$repo_url = "https://pkg.threatstack.com/v2/Amazon/${facts['os']['release']['major']}"
$disable_auditd = true
}
/(CentOS|RedHat)/: {
Expand Down

0 comments on commit 7386aa3

Please sign in to comment.