2013-10-21 17:21:12 +02:00
|
|
|
# PRIVATE CLASS - do not use directly
|
2014-10-07 16:06:54 +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":
|
2015-08-29 15:08:05 +02:00
|
|
|
dport => $http_port,
|
2013-10-21 17:21:12 +02:00
|
|
|
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":
|
2015-08-29 15:08:05 +02:00
|
|
|
dport => $ssl_port,
|
2013-10-21 17:21:12 +02:00
|
|
|
proto => 'tcp',
|
|
|
|
action => 'accept',
|
2012-09-20 23:46:26 +02:00
|
|
|
}
|
2012-09-18 02:06:48 +02:00
|
|
|
}
|
|
|
|
}
|