}
site::linux_module { 'dm_snapshot': }
+ ferm::module { 'ftp_conntrack': }
site::aptrepo { 'buildd':
ensure => absent,
+++ /dev/null
-hook pre 'modprobe nf_conntrack_ftp || true';
+++ /dev/null
-hook pre 'modprobe nf_conntrack_sip || true';
-hook pre 'modprobe nf_conntrack_h323 || true';
require => Package['debian.org'],
}
- if getfromhash($site::nodeinfo, 'buildd') {
- file { '/etc/ferm/conf.d/load_ftp_conntrack.conf':
- source => 'puppet:///modules/ferm/conntrack_ftp.conf',
- notify => Service['ferm'],
- }
- }
-
}
--- /dev/null
+define ferm::module (
+ $module,
+ $hookstage='pre',
+ $ensure=present
+) {
+ file { "/etc/ferm/conf.d/load_${module}.conf":
+ ensure => $ensure,
+ content => template('ferm/load_module.erb'),
+ require => Package['ferm'],
+ notify => Service['ferm']
+ }
+}
}
}
cilea: {
- file {
- '/etc/ferm/conf.d/load_sip_conntrack.conf':
- source => 'puppet:///modules/ferm/conntrack_sip.conf',
- require => Package['ferm'],
- notify => Service['ferm'],
- }
+ ferm::module { 'nf_conntrack_sip': }
+ ferm::module { 'nf_conntrack_h323': }
+
@ferm::rule { 'dsa-sip':
domain => '(ip ip6)',
description => 'Allow sip access',
--- /dev/null
+hook <%= scope.lookupvar('hookstage') %> 'modprobe <%= scope.lookupvar('module') %> || true';