diff --git a/integrations/puppet-module/sysdig-falco/manifests/init.pp b/integrations/puppet-module/sysdig-falco/manifests/init.pp index 8a718f76..9306e74e 100644 --- a/integrations/puppet-module/sysdig-falco/manifests/init.pp +++ b/integrations/puppet-module/sysdig-falco/manifests/init.pp @@ -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'] } diff --git a/integrations/puppet-module/sysdig-falco/manifests/install.pp b/integrations/puppet-module/sysdig-falco/manifests/install.pp index 1218b2cb..e5cfa84d 100644 --- a/integrations/puppet-module/sysdig-falco/manifests/install.pp +++ b/integrations/puppet-module/sysdig-falco/manifests/install.pp @@ -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) { diff --git a/integrations/puppet-module/sysdig-falco/manifests/repo.pp b/integrations/puppet-module/sysdig-falco/manifests/repo.pp new file mode 100644 index 00000000..4d560f0f --- /dev/null +++ b/integrations/puppet-module/sysdig-falco/manifests/repo.pp @@ -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}\"") + } + } +} diff --git a/integrations/puppet-module/sysdig-falco/manifests/service.pp b/integrations/puppet-module/sysdig-falco/manifests/service.pp index db25722b..44f7e3a1 100644 --- a/integrations/puppet-module/sysdig-falco/manifests/service.pp +++ b/integrations/puppet-module/sysdig-falco/manifests/service.pp @@ -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'], - ] } } diff --git a/integrations/puppet-module/sysdig-falco/metadata.json b/integrations/puppet-module/sysdig-falco/metadata.json index 6b8cd09e..102cf34a 100644 --- a/integrations/puppet-module/sysdig-falco/metadata.json +++ b/integrations/puppet-module/sysdig-falco/metadata.json @@ -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",