mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-10 05:03:37 +00:00
Puppet module fixes (#546)
! Make sure we add the Sysdig repo and call an update before trying to install Falco ! Remove the require in the service class to fix a dependencies loop * Bump the version to 0.4.0 falco-CLA-1.0-contributing-entity: Coveo Solutions Inc. falco-CLA-1.0-signed-off-by: Jean-Philippe Lachance <jplachance@coveo.com>
This commit is contained in:
parent
04b1b4da67
commit
e486af6d09
@ -29,11 +29,13 @@ class falco (
|
||||
$service_enable = $falco::params::service_enable,
|
||||
$service_restart = $falco::params::service_restart,
|
||||
) inherits falco::params {
|
||||
|
||||
class { 'falco::repo': }
|
||||
-> class { 'falco::install': }
|
||||
-> class { 'falco::config': }
|
||||
~> class { 'falco::service': }
|
||||
|
||||
contain falco::install
|
||||
contain falco::config
|
||||
contain falco::service
|
||||
|
||||
Class['::falco::install']
|
||||
-> Class['::falco::config']
|
||||
~> Class['::falco::service']
|
||||
}
|
||||
|
@ -1,49 +1,7 @@
|
||||
# == Class: falco::install
|
||||
class falco::install inherits falco {
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
apt::source { 'sysdig':
|
||||
location => 'http://download.draios.com/stable/deb',
|
||||
release => 'stable-$(ARCH)/',
|
||||
repos => '',
|
||||
key => {
|
||||
source => 'https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public',
|
||||
id => 'D27A72F32D867DF9300A241574490FD6EC51E8C4'
|
||||
},
|
||||
}
|
||||
|
||||
ensure_packages(["linux-headers-${::kernelrelease}"])
|
||||
|
||||
$dependencies = [
|
||||
Apt::Source['sysdig'],
|
||||
Package["linux-headers-${::kernelrelease}"],
|
||||
]
|
||||
}
|
||||
'RedHat': {
|
||||
include 'epel'
|
||||
|
||||
yumrepo { 'sysdig':
|
||||
baseurl => 'http://download.draios.com/stable/rpm/$basearch',
|
||||
descr => 'Sysdig repository by Draios',
|
||||
enabled => 1,
|
||||
gpgcheck => 0,
|
||||
}
|
||||
|
||||
ensure_packages(["kernel-devel-${::kernelrelease}"])
|
||||
|
||||
$dependencies = [
|
||||
Yumrepo['sysdig'],
|
||||
Class['epel']
|
||||
]
|
||||
}
|
||||
default: {
|
||||
$dependencies = []
|
||||
}
|
||||
}
|
||||
|
||||
package { 'falco':
|
||||
ensure => $::falco::package_ensure,
|
||||
require => $dependencies,
|
||||
ensure => $::falco::package_ensure,
|
||||
}
|
||||
|
||||
if ($::falco::file_output != undef) {
|
||||
|
41
integrations/puppet-module/sysdig-falco/manifests/repo.pp
Normal file
41
integrations/puppet-module/sysdig-falco/manifests/repo.pp
Normal file
@ -0,0 +1,41 @@
|
||||
# == Class: falco::repo
|
||||
class falco::repo inherits falco {
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
include apt::update
|
||||
|
||||
Apt::Source [ 'sysdig' ]
|
||||
-> Class [ 'apt::update' ]
|
||||
|
||||
apt::source { 'sysdig':
|
||||
location => 'http://download.draios.com/stable/deb',
|
||||
release => 'stable-$(ARCH)/',
|
||||
repos => '',
|
||||
key => {
|
||||
source => 'https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public',
|
||||
id => 'D27A72F32D867DF9300A241574490FD6EC51E8C4'
|
||||
},
|
||||
}
|
||||
|
||||
ensure_packages(["linux-headers-${::kernelrelease}"])
|
||||
}
|
||||
'RedHat': {
|
||||
include 'epel'
|
||||
|
||||
Yumrepo [ 'sysdig' ]
|
||||
-> Class [ 'epel' ]
|
||||
|
||||
yumrepo { 'sysdig':
|
||||
baseurl => 'http://download.draios.com/stable/rpm/$basearch',
|
||||
descr => 'Sysdig repository by Draios',
|
||||
enabled => 1,
|
||||
gpgcheck => 0,
|
||||
}
|
||||
|
||||
ensure_packages(["kernel-devel-${::kernelrelease}"])
|
||||
}
|
||||
default: {
|
||||
fail("\"${module_name}\" provides no repository information for OSfamily \"${::osfamily}\"")
|
||||
}
|
||||
}
|
||||
}
|
@ -16,9 +16,5 @@ class falco::service inherits falco {
|
||||
enable => $falco::service_enable,
|
||||
hasstatus => true,
|
||||
hasrestart => $falco::service_restart,
|
||||
require => [
|
||||
Class['falco::install'],
|
||||
Class['falco::config'],
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sysdig-falco",
|
||||
"version": "0.3.0",
|
||||
"version": "0.4.0",
|
||||
"author": "sysdig",
|
||||
"summary": "Sysdig Falco: Behavioral Activity Monitoring With Container Support",
|
||||
"license": "Apache-2.0",
|
||||
|
Loading…
Reference in New Issue
Block a user