Created
May 16, 2012 16:06
-
-
Save jtopper/2711679 to your computer and use it in GitHub Desktop.
lolcurrying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class sf_apache::params { | |
$fw_name_service = '0080 apache service' | |
} | |
class sf_apache::config ( $httpd_config ) { | |
include sf_apache::params | |
@firewall { $sf_apache::params::fw_name_service: | |
proto => "tcp", | |
dport => $httpd_config['Port'] | |
} | |
# ... | |
} | |
class sf_apache::firewall_allow::service ( $sources ) { | |
include sf_apache::params | |
Firewall<| title == $sf_apache::params::fw_name_service |> { | |
source => $sources | |
} | |
} | |
# Permits usage like: | |
class { sf_apache: | |
httpd_config => { | |
'MPM' => 'prefork', | |
'StartServers' => '10', | |
'MinSpareServers' => '10', | |
'MaxSpareServers' => '10', | |
'ServerLimit' => '256', | |
'MaxClients' => '256', | |
'MaxRequestsPerChild' => '4000', | |
'Port' => '80' | |
} | |
} | |
class { "sf_apache::firewall_allow::service": | |
sources => '127.0.0.1/32' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment