Restrict ssh to anycast and static mirrors
[mirror/dsa-puppet.git] / modules / ferm / manifests / module.pp
1 define ferm::module (
2         $hookstage='pre',
3         $mod=undef,
4         $ensure=present
5 ) {
6
7         case $ensure {
8                 present,absent: {}
9                 default: { fail ( "Invalid ensure `${ensure}' for ${name}" ) }
10         }
11
12         if $mod {
13                 $module = $mod
14         } else {
15                 $module = $title
16         }
17
18         if $::kernel == 'Linux' {
19                 file { "/etc/ferm/conf.d/load_${module}.conf":
20                         ensure  => $ensure,
21                         content => template('ferm/load_module.erb'),
22                         require => Package['ferm'],
23                         notify  => Service['ferm']
24                 }
25         }
26 }