aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-02-28 20:40:38 +0100
committerMicah Anderson <micah@riseup.net>2013-03-23 10:51:19 -0400
commit25cea9a44ab5e949e1fe0a470bb8d7c4c7bfd014 (patch)
treef2a91f34e3c5853f96d180b1831636a2e94d3169
parent3139e5a544868542a7534c6dd2e09f69d0c046a2 (diff)
downloadpuppet-shorewall-25cea9a44ab5e949e1fe0a470bb8d7c4c7bfd014.tar.gz
puppet-shorewall-25cea9a44ab5e949e1fe0a470bb8d7c4c7bfd014.tar.bz2
linting
-rw-r--r--manifests/base.pp75
1 files changed, 40 insertions, 35 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 6f39bcf..4ee8747 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,43 +1,48 @@
+# base things for shorewall
class shorewall::base {
- package { 'shorewall':
- ensure => $shorewall::ensure_version,
- }
+ package { 'shorewall':
+ ensure => $shorewall::ensure_version,
+ }
+
+ # This file has to be managed in place, so shorewall can find it
+ file {
+ '/etc/shorewall/shorewall.conf':
+ require => Package[shorewall],
+ notify => Service[shorewall],
+ owner => root,
+ group => 0,
+ mode => '0644';
+ '/etc/shorewall/puppet':
+ ensure => directory,
+ require => Package[shorewall],
+ owner => root,
+ group => 0,
+ mode => '0644';
+ }
- # This file has to be managed in place, so shorewall can find it
- file {
- '/etc/shorewall/shorewall.conf':
- require => Package[shorewall],
- notify => Service[shorewall],
- owner => root, group => 0, mode => 0644;
- '/etc/shorewall/puppet':
- ensure => directory,
- require => Package[shorewall],
- owner => root, group => 0, mode => 0644;
+ if $shorewall::conf_source {
+ File['/etc/shorewall/shorewall.conf']{
+ source => $shorewall::conf_source,
}
+ } else {
- if $shorewall::conf_source {
- File['/etc/shorewall/shorewall.conf']{
- source => $shorewall::conf_source,
- }
- } else {
+ require augeas
- require augeas
+ augeas { 'shorewall_module_config_path':
+ changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'',
+ lens => 'Shellvars.lns',
+ incl => '/etc/shorewall/shorewall.conf',
+ notify => Service['shorewall'],
+ require => Package['shorewall'];
+ }
+ }
- augeas { 'shorewall_module_config_path':
- changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'',
- lens => 'Shellvars.lns',
- incl => '/etc/shorewall/shorewall.conf',
- notify => Service[shorewall],
- require => Package['shorewall'];
- }
- }
-
- service{shorewall:
- ensure => running,
- enable => true,
- hasstatus => true,
- hasrestart => true,
- require => Package[shorewall],
- }
+ service{'shorewall':
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ hasrestart => true,
+ require => Package['shorewall'],
+ }
}