projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typo?
[mirror/dsa-puppet.git]
/
modules
/
ferm
/
manifests
/
init.pp
diff --git
a/modules/ferm/manifests/init.pp
b/modules/ferm/manifests/init.pp
index
78becb9
..
84fc808
100644
(file)
--- a/
modules/ferm/manifests/init.pp
+++ b/
modules/ferm/manifests/init.pp
@@
-4,43
+4,53
@@
class ferm {
ensure => present,
owner => root,
group => root,
ensure => present,
owner => root,
group => root,
- mode => 0
6
00,
+ mode => 0
4
00,
content => template("ferm/ferm-rule.erb"),
notify => Exec["ferm restart"],
}
}
content => template("ferm/ferm-rule.erb"),
notify => Exec["ferm restart"],
}
}
+ # realize (i.e. enable) all @ferm::rule virtual resources
+ Ferm::Rule <| |>
+
package { ferm: ensure => installed }
file {
package { ferm: ensure => installed }
file {
- "/etc/ferm/dsa.d":
+ "/etc/ferm/dsa.d":
ensure => directory,
ensure => directory,
+ purge => true,
+ force => true,
+ recurse => true,
+ source => "puppet:///files/empty/",
require => Package["ferm"];
require => Package["ferm"];
- "/etc/ferm/conf.d":
+ "/etc/ferm/conf.d":
ensure => directory,
require => Package["ferm"];
"/etc/ferm/ferm.conf":
source => "puppet:///ferm/ferm.conf",
require => Package["ferm"],
ensure => directory,
require => Package["ferm"];
"/etc/ferm/ferm.conf":
source => "puppet:///ferm/ferm.conf",
require => Package["ferm"],
+ mode => 0400,
notify => Exec["ferm restart"];
"/etc/ferm/conf.d/me.conf":
content => template("ferm/me.conf.erb"),
require => Package["ferm"],
notify => Exec["ferm restart"];
"/etc/ferm/conf.d/me.conf":
content => template("ferm/me.conf.erb"),
require => Package["ferm"],
+ mode => 0400,
notify => Exec["ferm restart"];
"/etc/ferm/conf.d/defs.conf":
notify => Exec["ferm restart"];
"/etc/ferm/conf.d/defs.conf":
-
source => "puppet:///ferm/defs.conf"
,
+
content => template("ferm/defs.conf.erb")
,
require => Package["ferm"],
require => Package["ferm"],
+ mode => 0400,
+ notify => Exec["ferm restart"];
+ "/etc/ferm/conf.d/interfaces.conf":
+ content => template("ferm/interfaces.conf.erb"),
+ require => Package["ferm"],
+ mode => 0400,
notify => Exec["ferm restart"];
notify => Exec["ferm restart"];
- }
-
- ferm::rule { "dsa-ssh":
- description => "Allow SSH from DSA",
- domain => "(ip ip6)",
- rule => "proto tcp mod state state (NEW) dport (ssh) @subchain 'ssh' { saddr (\$SSH_SOURCES) ACCEPT; }"
}
exec { "ferm restart":
}
exec { "ferm restart":
-
path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin
",
+
command => "/etc/init.d/ferm restart
",
refreshonly => true,
}
refreshonly => true,
}
+
}
}