2013-10-21 17:21:12 +02:00
|
|
|
# PRIVATE CLASS - do not use directly
|
2012-09-18 02:06:48 +02:00
|
|
|
class puppetdb::server::firewall(
|
2013-10-21 17:21:12 +02:00
|
|
|
$http_port = $puppetdb::params::listen_port,
|
|
|
|
$open_http_port = $puppetdb::params::open_listen_port,
|
|
|
|
$ssl_port = $puppetdb::params::ssl_listen_port,
|
|
|
|
$open_ssl_port = $puppetdb::params::open_ssl_listen_port,
|
2012-09-18 02:06:48 +02:00
|
|
|
) inherits puppetdb::params {
|
2013-10-21 17:21:12 +02:00
|
|
|
include firewall
|
2012-11-13 21:38:38 +01:00
|
|
|
|
2013-10-21 17:21:12 +02:00
|
|
|
if ($open_http_port) {
|
|
|
|
firewall { "${http_port} accept - puppetdb":
|
|
|
|
port => $http_port,
|
|
|
|
proto => 'tcp',
|
|
|
|
action => 'accept',
|
2013-01-17 02:52:11 +01:00
|
|
|
}
|
2013-10-21 17:21:12 +02:00
|
|
|
}
|
2012-09-20 23:46:26 +02:00
|
|
|
|
2013-10-21 17:21:12 +02:00
|
|
|
if ($open_ssl_port) {
|
|
|
|
firewall { "${ssl_port} accept - puppetdb":
|
|
|
|
port => $ssl_port,
|
|
|
|
proto => 'tcp',
|
|
|
|
action => 'accept',
|
2012-09-20 23:46:26 +02:00
|
|
|
}
|
2012-09-18 02:06:48 +02:00
|
|
|
}
|
|
|
|
}
|